Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Chess Program in C#

, 8 Jan 2015 GPL3
SrcChess is a chess program built in C#
Article_demo-noexe.zip
111probs.pgn
Article_demo.zip
111probs.pgn
SrcChess2.exe
Article_src.zip
SrcChess2
Analyze.ruleset
Book.bin
PieceSets
Adventurer
Alpfonso-X
Alpha
Alpha-2
Arial Unicode MS
Berlin
Cases
Chess-7
Condal
Harlequin
Kingdom
Leipzig
Line
Lucena
Magnetic
Maya
Mediaeval
Merida
Millennia
Motif
MS Mincho
Plain
Segoe UI Symbol
Smart
Traveller Standard
Usual
Properties
Settings.settings
Resources
image.png
<UserControl x:Class="SrcChess2.ChessToolBar"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:my="clr-namespace:SrcChess2"
             mc:Ignorable="d" 
             d:DesignHeight="57" d:DesignWidth="645">
    <UserControl.Resources>
        <ResourceDictionary>
            <DrawingImage x:Key="Save">
                <DrawingImage.Drawing>
                    <DrawingGroup>
                        <DrawingGroup.Children>
                            <GeometryDrawing Brush="#CD347DBC" Geometry="F1 M 33.9999,33.75L 94,33.75L 94,94.25L 33.9999,94.25L 33.9999,33.75 Z ">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#CD406BBA"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <GeometryDrawing Brush="#CDFFFFFF" Geometry="F1 M 41.0002,33.7501L 88.0001,33.7501L 88.0001,76.7502L 41.0002,76.7502L 41.0002,33.7501 Z ">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#CD406BBA"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <GeometryDrawing Brush="#CD347DBC" Geometry="F1 M 49.1667,40.4167L 80.6667,40.4167">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#CD406BBA"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <GeometryDrawing Brush="#CD347DBC" Geometry="F1 M 48.9167,46.4167L 80.4167,46.4167">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#CD406BBA"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <GeometryDrawing Brush="#CD347DBC" Geometry="F1 M 49.0417,51.75L 80.5417,51.75">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#CD406BBA"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <GeometryDrawing Brush="#CD347DBC" Geometry="F1 M 48.7917,57.75L 80.2917,57.75">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#CD406BBA"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                        </DrawingGroup.Children>
                    </DrawingGroup>
                </DrawingImage.Drawing>
            </DrawingImage>
            <DrawingImage x:Key="Save_Disabled">
                <DrawingImage.Drawing>
                    <DrawingGroup>
                        <DrawingGroup.Children>
                            <GeometryDrawing Brush="#CDD3E0EB" Geometry="F1 M 33.9999,33.75L 94,33.75L 94,94.25L 33.9999,94.25L 33.9999,33.75 Z ">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#CD406BBA"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <GeometryDrawing Brush="#CDFFFFFF" Geometry="F1 M 41.0002,33.7501L 88.0001,33.7501L 88.0001,76.7502L 41.0002,76.7502L 41.0002,33.7501 Z ">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#CD406BBA"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <GeometryDrawing Brush="#CD347DBC" Geometry="F1 M 49.1667,40.4167L 80.6667,40.4167">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#CD406BBA"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <GeometryDrawing Brush="#CD347DBC" Geometry="F1 M 48.9167,46.4167L 80.4167,46.4167">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#CD406BBA"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <GeometryDrawing Brush="#CD347DBC" Geometry="F1 M 49.0417,51.75L 80.5417,51.75">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#CD406BBA"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <GeometryDrawing Brush="#CD347DBC" Geometry="F1 M 48.7917,57.75L 80.2917,57.75">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#CD406BBA"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                        </DrawingGroup.Children>
                    </DrawingGroup>
                </DrawingImage.Drawing>
            </DrawingImage>
            <DrawingImage x:Key="New">
                <DrawingImage.Drawing>
                    <DrawingGroup>
                        <DrawingGroup.Children>
                            <GeometryDrawing Brush="#FFD6F7A6" Geometry="F1 M 422.25,270.563L 421.875,329.438L 377.75,328.938L 378,282.063L 391,270.563L 422.25,270.563 Z ">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#FF6576CC"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                        </DrawingGroup.Children>
                    </DrawingGroup>
                </DrawingImage.Drawing>
            </DrawingImage>
            <DrawingImage x:Key="New_Disabled">
                <DrawingImage.Drawing>
                    <DrawingGroup>
                        <DrawingGroup.Children>
                            <GeometryDrawing Brush="#FFE5E9DE" Geometry="F1 M 422.25,270.563L 421.875,329.438L 377.75,328.938L 378,282.063L 391,270.563L 422.25,270.563 Z ">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#FF6576CC"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                        </DrawingGroup.Children>
                    </DrawingGroup>
                </DrawingImage.Drawing>
            </DrawingImage>
            <DrawingImage x:Key="Undo">
                <DrawingImage.Drawing>
                    <DrawingGroup>
                        <DrawingGroup.Children>
                            <GeometryDrawing Geometry="F1 M 400,271.982C 416.569,271.982 430,285.413 430,301.982C 430,318.55 416.569,331.982 400,331.982C 383.431,331.982 370,318.55 370,301.982C 370,285.413 383.431,271.982 400,271.982 Z ">
                                <GeometryDrawing.Pen>
                                    <Pen Thickness="2" LineJoin="Round" Brush="#FFADD63B"/>
                                </GeometryDrawing.Pen>
                                <GeometryDrawing.Brush>
                                    <LinearGradientBrush StartPoint="0.495707,-0.0023997" EndPoint="0.495707,1.025">
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop Color="#FF537700" Offset="0"/>
                                            <GradientStop Color="#FFA2D72D" Offset="0.429224"/>
                                            <GradientStop Color="#FFF5FFE8" Offset="1"/>
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </GeometryDrawing.Brush>
                            </GeometryDrawing>
                            <DrawingGroup ClipGeometry="F1 M 400,271.982C 416.569,271.982 430,285.413 430,301.982C 430,318.55 416.569,331.982 400,331.982C 383.431,331.982 370,318.55 370,301.982C 370,285.413 383.431,271.982 400,271.982 Z ">
                                <DrawingGroup.Children>
                                    <GeometryDrawing Geometry="F1 M 400,263.14C 422.644,263.14 441,271.199 441,281.14C 441,291.081 422.644,299.14 400,299.14C 377.356,299.14 359,291.081 359,281.14C 359,271.199 377.356,263.14 400,263.14 Z ">
                                        <GeometryDrawing.Brush>
                                            <LinearGradientBrush StartPoint="0.538618,0.30384" EndPoint="0.538618,1.01989">
                                                <LinearGradientBrush.GradientStops>
                                                    <GradientStop Color="#CDFFFFFF" Offset="0"/>
                                                    <GradientStop Color="#00E8FBFF" Offset="1"/>
                                                </LinearGradientBrush.GradientStops>
                                            </LinearGradientBrush>
                                        </GeometryDrawing.Brush>
                                    </GeometryDrawing>
                                </DrawingGroup.Children>
                            </DrawingGroup>
                            <GeometryDrawing Brush="#CD215F95" Geometry="F1 M 394.334,292.254L 392.48,290.674C 391.909,290.854 391.376,291.479 391.289,292.071L 389.773,299.943C 389.686,300.535 390.045,300.816 390.615,300.636L 398.18,297.945C 398.751,297.765 399.284,297.139 399.371,296.547L 397.517,294.967"/>
                            <GeometryDrawing Geometry="F1 M 395.5,294.32C 398.333,292.083 401.167,289.846 404.25,289.49C 407.333,289.134 410.667,290.659 412.125,293.608C 413.583,296.557 413.167,300.929 410.833,305.098C 408.5,309.267 404.25,313.233 400,317.198">
                                <GeometryDrawing.Pen>
                                    <Pen Thickness="3" LineJoin="Round" Brush="#CD406BBA"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                        </DrawingGroup.Children>
                    </DrawingGroup>
                </DrawingImage.Drawing>
            </DrawingImage>
            <DrawingImage x:Key="Undo_Disabled">
                <DrawingImage.Drawing>
                    <DrawingGroup>
                        <DrawingGroup.Children>
                            <GeometryDrawing Brush="#FFD3D8CD" Geometry="F1 M 400,271.795C 416.569,271.795 430,285.227 430,301.795C 430,318.364 416.569,331.795 400,331.795C 383.431,331.795 370,318.364 370,301.795C 370,285.227 383.431,271.795 400,271.795 Z ">
                                <GeometryDrawing.Pen>
                                    <Pen Thickness="2" LineJoin="Round" Brush="#FFADD63B"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <DrawingGroup ClipGeometry="F1 M 400,271.795C 416.569,271.795 430,285.227 430,301.795C 430,318.364 416.569,331.795 400,331.795C 383.431,331.795 370,318.364 370,301.795C 370,285.227 383.431,271.795 400,271.795 Z ">
                                <DrawingGroup.Children>
                                    <GeometryDrawing Geometry="F1 M 400,262.953C 422.644,262.953 441,271.012 441,280.953C 441,290.894 422.644,298.953 400,298.953C 377.356,298.953 359,290.894 359,280.953C 359,271.012 377.356,262.953 400,262.953 Z ">
                                        <GeometryDrawing.Brush>
                                            <LinearGradientBrush StartPoint="0.538618,0.303839" EndPoint="0.538618,1.01989">
                                                <LinearGradientBrush.GradientStops>
                                                    <GradientStop Color="#CDFFFFFF" Offset="0"/>
                                                    <GradientStop Color="#00E8FBFF" Offset="1"/>
                                                </LinearGradientBrush.GradientStops>
                                            </LinearGradientBrush>
                                        </GeometryDrawing.Brush>
                                    </GeometryDrawing>
                                </DrawingGroup.Children>
                            </DrawingGroup>
                            <GeometryDrawing Brush="#CDC0D5E7" Geometry="F1 M 394.334,292.067L 392.48,290.487C 391.909,290.667 391.376,291.293 391.289,291.885L 389.773,299.756C 389.686,300.348 390.045,300.629 390.615,300.449L 398.18,297.758C 398.751,297.578 399.284,296.952 399.371,296.36L 397.517,294.78"/>
                            <GeometryDrawing Geometry="F1 M 395.5,294.133C 398.333,291.896 401.167,289.659 404.25,289.303C 407.333,288.947 410.667,290.473 412.125,293.421C 413.583,296.37 413.167,300.743 410.833,304.912C 408.5,309.08 404.25,313.046 400,317.012">
                                <GeometryDrawing.Pen>
                                    <Pen Thickness="3" LineJoin="Round" Brush="#CDCAD1DA"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                        </DrawingGroup.Children>
                    </DrawingGroup>
                </DrawingImage.Drawing>
            </DrawingImage>
            <DrawingImage x:Key="Hint">
                <DrawingImage.Drawing>
                    <DrawingGroup>
                        <DrawingGroup.Children>
                            <GeometryDrawing Geometry="F1 M 64,35.8618C 80.5685,35.8618 94,49.2933 94,65.8618C 94,82.4304 80.5685,95.8618 64,95.8618C 47.4314,95.8618 34,82.4304 34,65.8618C 34,49.2933 47.4314,35.8618 64,35.8618 Z ">
                                <GeometryDrawing.Pen>
                                    <Pen Thickness="2" LineJoin="Round" Brush="#FFADD63B"/>
                                </GeometryDrawing.Pen>
                                <GeometryDrawing.Brush>
                                    <LinearGradientBrush StartPoint="0.495708,-0.00239957" EndPoint="0.495708,1.025">
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop Color="#FF537700" Offset="0"/>
                                            <GradientStop Color="#FFA2D72D" Offset="0.429224"/>
                                            <GradientStop Color="#FFF5FFE8" Offset="1"/>
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </GeometryDrawing.Brush>
                            </GeometryDrawing>
                            <DrawingGroup ClipGeometry="F1 M 64,35.8618C 80.5686,35.8618 94,49.2933 94,65.8618C 94,82.4304 80.5685,95.8618 64,95.8618C 47.4314,95.8618 34,82.4304 34,65.8618C 34,49.2933 47.4314,35.8618 64,35.8618 Z ">
                                <DrawingGroup.Children>
                                    <GeometryDrawing Geometry="F1 M 64,27.02C 86.6437,27.02 105,35.0789 105,45.02C 105,54.9611 86.6437,63.02 64,63.02C 41.3563,63.02 23,54.9611 23,45.02C 23,35.0789 41.3563,27.02 64,27.02 Z ">
                                        <GeometryDrawing.Brush>
                                            <LinearGradientBrush StartPoint="0.538618,0.303839" EndPoint="0.538618,1.01989">
                                                <LinearGradientBrush.GradientStops>
                                                    <GradientStop Color="#CDFFFFFF" Offset="0"/>
                                                    <GradientStop Color="#00E8FBFF" Offset="1"/>
                                                </LinearGradientBrush.GradientStops>
                                            </LinearGradientBrush>
                                        </GeometryDrawing.Brush>
                                    </GeometryDrawing>
                                </DrawingGroup.Children>
                            </DrawingGroup>
                            <GeometryDrawing Brush="#FFD2E0BD" Geometry="F1 M 61.0323,73.6137C 60.8737,73.1711 60.7304,72.594 60.6024,71.8825C 60.4743,71.171 60.4103,70.4623 60.4103,69.7563C 60.4103,68.6639 60.6557,67.6764 61.1466,66.794C 61.6375,65.9116 62.2503,65.0853 62.9851,64.3149C 63.7199,63.5446 64.5202,62.8036 65.3861,62.0921C 66.252,61.3806 67.0523,60.6607 67.7871,59.9324C 68.5219,59.204 69.1347,58.4421 69.6256,57.6465C 70.1164,56.851 70.3619,55.9714 70.3619,55.0078C 70.3619,54.1898 70.1835,53.4629 69.8268,52.827C 69.4701,52.1911 68.9822,51.6589 68.3633,51.2303C 67.7444,50.8017 67.0294,50.4809 66.2184,50.2681C 65.4074,50.0552 64.5476,49.9487 63.6391,49.9487C 60.3706,49.9487 57.5382,51.2037 55.1418,53.7136L 55.1418,48.8394C 58.0992,47.069 61.1664,46.1838 64.3434,46.1838C 65.8129,46.1838 67.1956,46.3561 68.4914,46.7007C 69.7872,47.0452 70.9229,47.5578 71.8985,48.2385C 72.8742,48.9193 73.6425,49.7694 74.2035,50.7891C 74.7645,51.8087 75.045,52.9909 75.045,54.3355C 75.045,55.6128 74.7873,56.7515 74.2721,57.7516C 73.7568,58.7516 73.1074,59.6704 72.3238,60.508C 71.5403,61.3456 70.6912,62.1257 69.7765,62.8485C 68.8618,63.5712 68.0127,64.2911 67.2291,65.0082C 66.4456,65.7253 65.7962,66.4719 65.2809,67.2478C 64.7656,68.0238 64.508,68.8768 64.508,69.8068C 64.508,70.6023 64.6132,71.3236 64.8236,71.9707C 65.0339,72.6178 65.2428,73.1655 65.4501,73.6137L 61.0323,73.6137 Z M 63.6299,84.9083C 62.7762,84.9083 62.0231,84.6226 61.3707,84.0511C 60.7304,83.4797 60.4103,82.785 60.4103,81.967C 60.4103,81.1266 60.7304,80.4291 61.3707,79.8745C 62.0049,79.2862 62.7579,78.9921 63.6299,78.9921C 64.5019,78.9921 65.255,79.2862 65.8891,79.8745C 66.5294,80.4291 66.8495,81.1266 66.8495,81.967C 66.8495,82.785 66.5294,83.4797 65.8891,84.0511C 65.2367,84.6226 64.4836,84.9083 63.6299,84.9083 Z ">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#FF6576CC"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                        </DrawingGroup.Children>
                    </DrawingGroup>
                </DrawingImage.Drawing>
            </DrawingImage>
            <DrawingImage x:Key="Hint_Disabled">
                <DrawingImage.Drawing>
                    <DrawingGroup>
                        <DrawingGroup.Children>
                            <GeometryDrawing Brush="#FFD3D8CD" Geometry="F1 M 64,35.8618C 80.5685,35.8618 94,49.2933 94,65.8618C 94,82.4304 80.5685,95.8618 64,95.8618C 47.4314,95.8618 34,82.4304 34,65.8618C 34,49.2933 47.4314,35.8618 64,35.8618 Z ">
                                <GeometryDrawing.Pen>
                                    <Pen Thickness="2" LineJoin="Round" Brush="#FFADD63B"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <DrawingGroup ClipGeometry="F1 M 64,35.8618C 80.5686,35.8618 94,49.2933 94,65.8618C 94,82.4304 80.5685,95.8618 64,95.8618C 47.4314,95.8618 34,82.4304 34,65.8618C 34,49.2933 47.4314,35.8618 64,35.8618 Z ">
                                <DrawingGroup.Children>
                                    <GeometryDrawing Geometry="F1 M 64,27.02C 86.6437,27.02 105,35.0789 105,45.02C 105,54.9611 86.6437,63.02 64,63.02C 41.3563,63.02 23,54.9611 23,45.02C 23,35.0789 41.3563,27.02 64,27.02 Z ">
                                        <GeometryDrawing.Brush>
                                            <LinearGradientBrush StartPoint="0.538618,0.303839" EndPoint="0.538618,1.01989">
                                                <LinearGradientBrush.GradientStops>
                                                    <GradientStop Color="#CDFFFFFF" Offset="0"/>
                                                    <GradientStop Color="#00E8FBFF" Offset="1"/>
                                                </LinearGradientBrush.GradientStops>
                                            </LinearGradientBrush>
                                        </GeometryDrawing.Brush>
                                    </GeometryDrawing>
                                </DrawingGroup.Children>
                            </DrawingGroup>
                            <GeometryDrawing Brush="#FFD2E0BD" Geometry="F1 M 61.0323,73.6137C 60.8737,73.1711 60.7304,72.594 60.6024,71.8825C 60.4743,71.171 60.4103,70.4623 60.4103,69.7563C 60.4103,68.6639 60.6557,67.6764 61.1466,66.794C 61.6375,65.9116 62.2503,65.0853 62.9851,64.3149C 63.7199,63.5446 64.5202,62.8036 65.3861,62.0921C 66.252,61.3806 67.0523,60.6607 67.7871,59.9324C 68.5219,59.204 69.1347,58.4421 69.6256,57.6465C 70.1164,56.851 70.3619,55.9714 70.3619,55.0078C 70.3619,54.1898 70.1835,53.4629 69.8268,52.827C 69.4701,52.1911 68.9822,51.6589 68.3633,51.2303C 67.7444,50.8017 67.0294,50.4809 66.2184,50.2681C 65.4074,50.0552 64.5476,49.9487 63.6391,49.9487C 60.3706,49.9487 57.5382,51.2037 55.1418,53.7136L 55.1418,48.8394C 58.0992,47.069 61.1664,46.1838 64.3434,46.1838C 65.8129,46.1838 67.1956,46.3561 68.4914,46.7007C 69.7872,47.0452 70.9229,47.5578 71.8985,48.2385C 72.8742,48.9193 73.6425,49.7694 74.2035,50.7891C 74.7645,51.8087 75.045,52.9909 75.045,54.3355C 75.045,55.6128 74.7873,56.7515 74.2721,57.7516C 73.7568,58.7516 73.1074,59.6704 72.3238,60.508C 71.5403,61.3456 70.6912,62.1257 69.7765,62.8485C 68.8618,63.5712 68.0127,64.2911 67.2291,65.0082C 66.4456,65.7253 65.7962,66.4719 65.2809,67.2478C 64.7656,68.0238 64.508,68.8768 64.508,69.8068C 64.508,70.6023 64.6132,71.3236 64.8236,71.9707C 65.0339,72.6178 65.2428,73.1655 65.4501,73.6137L 61.0323,73.6137 Z M 63.6299,84.9083C 62.7762,84.9083 62.0231,84.6226 61.3707,84.0511C 60.7304,83.4797 60.4103,82.785 60.4103,81.967C 60.4103,81.1266 60.7304,80.4291 61.3707,79.8745C 62.0049,79.2862 62.7579,78.9921 63.6299,78.9921C 64.5019,78.9921 65.255,79.2862 65.8891,79.8745C 66.5294,80.4291 66.8495,81.1266 66.8495,81.967C 66.8495,82.785 66.5294,83.4797 65.8891,84.0511C 65.2367,84.6226 64.4836,84.9083 63.6299,84.9083 Z ">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#FFCAD1DA"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                        </DrawingGroup.Children>
                    </DrawingGroup>
                </DrawingImage.Drawing>
            </DrawingImage>
            <DrawingImage x:Key="Cancel">
                <DrawingImage.Drawing>
                    <DrawingGroup>
                        <DrawingGroup.Children>
                            <GeometryDrawing Geometry="F1 M 400,271.762C 416.568,271.762 430,285.193 430,301.762C 430,318.33 416.568,331.762 400,331.762C 383.431,331.762 370,318.33 370,301.762C 370,285.193 383.431,271.762 400,271.762 Z ">
                                <GeometryDrawing.Pen>
                                    <Pen Thickness="2" LineJoin="Round" Brush="#FFADD63B"/>
                                </GeometryDrawing.Pen>
                                <GeometryDrawing.Brush>
                                    <LinearGradientBrush StartPoint="0.495708,-0.0023997" EndPoint="0.495708,1.025">
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop Color="#FF537700" Offset="0"/>
                                            <GradientStop Color="#FFA2D72D" Offset="0.429224"/>
                                            <GradientStop Color="#FFF5FFE8" Offset="1"/>
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </GeometryDrawing.Brush>
                            </GeometryDrawing>
                            <DrawingGroup ClipGeometry="F1 M 400,271.762C 416.568,271.762 430,285.193 430,301.762C 430,318.33 416.568,331.762 400,331.762C 383.431,331.762 370,318.33 370,301.762C 370,285.193 383.431,271.762 400,271.762 Z ">
                                <DrawingGroup.Children>
                                    <GeometryDrawing Geometry="F1 M 400,262.92C 422.644,262.92 441,270.979 441,280.92C 441,290.861 422.644,298.92 400,298.92C 377.356,298.92 359,290.861 359,280.92C 359,270.979 377.356,262.92 400,262.92 Z ">
                                        <GeometryDrawing.Brush>
                                            <LinearGradientBrush StartPoint="0.538618,0.303839" EndPoint="0.538618,1.01989">
                                                <LinearGradientBrush.GradientStops>
                                                    <GradientStop Color="#CDFFFFFF" Offset="0"/>
                                                    <GradientStop Color="#00E8FBFF" Offset="1"/>
                                                </LinearGradientBrush.GradientStops>
                                            </LinearGradientBrush>
                                        </GeometryDrawing.Brush>
                                    </GeometryDrawing>
                                </DrawingGroup.Children>
                            </DrawingGroup>
                            <GeometryDrawing Brush="#FFD2E0BD" Geometry="F1 M 418.479,318.57L 411.831,318.57L 401.128,305.708C 400.8,305.318 400.442,304.763 400.052,304.043L 399.929,304.043C 399.711,304.403 399.342,304.958 398.823,305.708L 387.792,318.57L 381.114,318.57L 396.805,301.68L 382.425,284.97L 389.124,284.97L 398.659,296.783C 399.288,297.563 399.841,298.343 400.319,299.123L 400.452,299.123C 401.148,298.093 401.756,297.28 402.275,296.685L 412.2,284.97L 418.479,284.97L 403.801,301.628L 418.479,318.57 Z ">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#FF6576CC"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                        </DrawingGroup.Children>
                    </DrawingGroup>
                </DrawingImage.Drawing>
            </DrawingImage>
            <DrawingImage x:Key="Cancel_Disabled">
                <DrawingImage.Drawing>
                    <DrawingGroup>
                        <DrawingGroup.Children>
                            <GeometryDrawing Brush="#FFD3D8CD" Geometry="F1 M 63.9999,35.7619C 80.5685,35.7619 93.9999,49.1934 93.9999,65.7619C 93.9999,82.3304 80.5685,95.7619 63.9999,95.7619C 47.4314,95.7619 33.9999,82.3304 33.9999,65.7619C 33.9999,49.1934 47.4314,35.7619 63.9999,35.7619 Z ">
                                <GeometryDrawing.Pen>
                                    <Pen Thickness="2" LineJoin="Round" Brush="#FFADD63B"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <DrawingGroup ClipGeometry="F1 M 63.9999,35.7618C 80.5685,35.7618 93.9999,49.1933 93.9999,65.7618C 93.9999,82.3304 80.5685,95.7618 63.9999,95.7618C 47.4314,95.7618 33.9999,82.3304 33.9999,65.7618C 33.9999,49.1933 47.4314,35.7618 63.9999,35.7618 Z ">
                                <DrawingGroup.Children>
                                    <GeometryDrawing Geometry="F1 M 64,26.92C 86.6437,26.92 105,34.9789 105,44.92C 105,54.8611 86.6437,62.92 64,62.92C 41.3563,62.92 23,54.8611 23,44.92C 23,34.9789 41.3563,26.92 64,26.92 Z ">
                                        <GeometryDrawing.Brush>
                                            <LinearGradientBrush StartPoint="0.538618,0.303839" EndPoint="0.538618,1.01989">
                                                <LinearGradientBrush.GradientStops>
                                                    <GradientStop Color="#CDFFFFFF" Offset="0"/>
                                                    <GradientStop Color="#00E8FBFF" Offset="1"/>
                                                </LinearGradientBrush.GradientStops>
                                            </LinearGradientBrush>
                                        </GeometryDrawing.Brush>
                                    </GeometryDrawing>
                                </DrawingGroup.Children>
                            </DrawingGroup>
                            <GeometryDrawing Brush="#FFD2E0BD" Geometry="F1 M 82.4786,82.5701L 75.8312,82.5701L 65.1278,69.7076C 64.8,69.3176 64.4415,68.7626 64.0523,68.0426L 63.9294,68.0426C 63.7109,68.4026 63.3422,68.9576 62.8232,69.7076L 51.7921,82.5701L 45.114,82.5701L 60.8055,65.6801L 46.425,48.9701L 53.1236,48.9701L 62.6593,60.7826C 63.2876,61.5626 63.8406,62.3426 64.3186,63.1226L 64.4518,63.1226C 65.1483,62.0926 65.756,61.2801 66.2749,60.6851L 76.1999,48.9701L 82.4786,48.9701L 67.8011,65.6276L 82.4786,82.5701 Z ">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#FFCAD1DA"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                        </DrawingGroup.Children>
                    </DrawingGroup>
                </DrawingImage.Drawing>
            </DrawingImage>
        </ResourceDictionary>
    </UserControl.Resources>
    <ToolBar Name="tbMain" Band="1" BandIndex="1">
        <my:ToolBarButton x:Name="New" Command="my:MainWindow.NewGameCommand" Image="{StaticResource New}"  DisabledImage="{StaticResource New_Disabled}" HorizontalAlignment="Center" VerticalAlignment="Center" DisplayStyle="Image" Margin="2" />
        <my:ToolBarButton x:Name="Save" Command="my:MainWindow.SaveGameCommand" Image="{StaticResource Save}"  DisabledImage="{StaticResource Save_Disabled}" HorizontalAlignment="Center" VerticalAlignment="Center" DisplayStyle="Image" />
        <Separator />
        <my:ToolBarButton x:Name="Hint" Command="my:MainWindow.HintCommand" Image="{StaticResource Hint}"  DisabledImage="{StaticResource Hint_Disabled}" HorizontalAlignment="Center" VerticalAlignment="Center" DisplayStyle="Image" />
        <Separator />
        <my:ToolBarButton x:Name="Undo" Command="my:MainWindow.UndoCommand" Image="{StaticResource Undo}"  DisabledImage="{StaticResource Undo_Disabled}" HorizontalAlignment="Center" VerticalAlignment="Center" DisplayStyle="Image" />
        <my:ToolBarButton x:Name="Redo" Command="my:MainWindow.RedoCommand" Flip="True" Image="{StaticResource Undo}"  DisabledImage="{StaticResource Undo_Disabled}" HorizontalAlignment="Center" VerticalAlignment="Center" DisplayStyle="Image" />
        <Separator />
        <my:ToolBarButton x:Name="Cancel" Command="my:MainWindow.CancelPlayCommand" Image="{StaticResource Cancel}"  DisabledImage="{StaticResource Cancel_Disabled}" HorizontalAlignment="Center" VerticalAlignment="Center" DisplayStyle="Image" />
        <Separator />
        <Label Margin="50,0,0,0" VerticalAlignment="Center">White:</Label>
        <Label Name="labelWhitePlayTime" VerticalAlignment="Center">00:00:00</Label>
        <Label VerticalAlignment="Center" Margin="20,0,0,0">Black:</Label>
        <Label Name="labelBlackPlayTime" VerticalAlignment="Center">00:00:00</Label>
    </ToolBar>
</UserControl>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

Share

About the Author

Jacques Fournier
Web Developer Consyst SQL
Canada Canada
Consyst is a dynamic IT company specialized for more than 20 years in information technology architecture and in the development of innovative productivity tools for businesses. Rep++, the product at the core of its mission, can significantly accelerate the development cycle of applications and services by reducing the duration of the design, coding, testing and maintenance stages.
Rep++ uses a model-driven approach supported by a powerful model execution mechanism. Essential complement to Visual Studio® (Microsoft®), Rep++ includes: an open and centralized model that is used to define, contain and manage all the metadata of an application set; toolkits and application frameworks that implement various flavors of the presentation layer; and specialized assistants that simplify the creation of applications and services for a variety of architectures and technologies. These elements provide a very high automation level, which enable businesses to focus their development efforts on where it counts: their business rules.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150224.1 | Last Updated 8 Jan 2015
Article Copyright 2009 by Jacques Fournier
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid