<Window x:Class="PlantDemo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:PlantDemo"
        mc:Ignorable="d"
        Title="武器配置优化" Height="550" Width="1050" FontSize="18" Loaded="Window_Loaded">
    <StackPanel>
        <StackPanel Orientation="Horizontal" Height="40">
            <Grid>
                <Image Source="images/sunBack.png" />
                <TextBlock Name="tbSunScore" Text="2500" Margin="60,6,3,3" FontSize="24" Foreground="Red" />
            </Grid>
            <Border BorderThickness="1" BorderBrush="DarkBlue">
                <Image Name="imgWDSS" Tag="0" Source="images/wdss.png" IsEnabled="False" ToolTip = "豌豆射手 100" Height="38" PreviewMouseLeftButtonDown="imgWDSS_PreviewMouseLeftButtonDown" />
            </Border>
            <Border BorderThickness="1" BorderBrush="DarkBlue">
                <Image Name="imgWDSS2" Tag="1" Source="images/wdss2.png" IsEnabled="False" ToolTip = "双发豌豆射手 200" Height="38" PreviewMouseLeftButtonDown="imgWDSS2_PreviewMouseLeftButtonDown" />
            </Border>
            <Border BorderThickness="1" BorderBrush="DarkBlue">
                <Image Name="imgWDSS3" Tag="2" Source="images/wdss3.png" IsEnabled="False" ToolTip = "三发豌豆射手 300" Height="38" PreviewMouseLeftButtonDown="imgWDSS3_PreviewMouseLeftButtonDown" />
            </Border>
            <Border BorderThickness="1" BorderBrush="DarkBlue">
                <Image Name="imgHBSS" Tag="3" Source="images/hbss.png" IsEnabled="False" ToolTip = "寒冰射手 175" Height="38" PreviewMouseLeftButtonDown="imgHBSS_PreviewMouseLeftButtonDown" />
            </Border>
            <Border BorderThickness="1" BorderBrush="DarkBlue">
                <Image Name="imgXMG" Tag="4" Source="images/xmg.gif" IsEnabled="False" ToolTip = "小蘑菇 45" Height="38" PreviewMouseLeftButtonDown="imgXMG_PreviewMouseLeftButtonDown" />
            </Border>
            <Border BorderThickness="1" BorderBrush="DarkBlue">
                <Image Name="imgPMG" Tag="5" Source="images/pmg.png" IsEnabled="False" ToolTip = "胖蘑菇 225" Height="38" PreviewMouseLeftButtonDown="imgPMG_PreviewMouseLeftButtonDown" />
            </Border>
            <Button Name="btnClear" Margin="5,3,2,2" Content="清空" Width="75" Click="btnClear_Click" />
            <Button Name="btnCalc" Margin="5,3,2,2" Content="计算" Foreground="Blue" Width="75" Click="btnCalc_Click" />
            <Expander ExpandDirection="Right" FontSize="16">
                <StackPanel Orientation="Horizontal">
                    <Label Content="算法" Foreground="Blue" Margin="1" />
                    <ComboBox Name="cmbAlgs" SelectionChanged="cmbAlgs_SelectionChanged" />
                    <Label Content="种群" Foreground="Blue" Margin="1" />
                    <TextBox Name="tbSize" Foreground="Blue" Margin="2,5,2,5" Text="40"/>
                    <Label Content="迭代" Foreground="Blue" Margin="1" />
                    <TextBox Name="tbIters" Foreground="Blue" Margin="2,5,2,5" Text="100"/>
                    <Button Name="btnSolve" Content="求解" Width="60" Margin="2" Foreground="Blue" Click="btnSolve_Click"/>
                    <TextBlock Name="tbDamage" Text="攻击力" Margin="2,5,2,5" Foreground="Blue" FontWeight="Bold" />
                </StackPanel>
            </Expander>
        </StackPanel>
        <Border BorderThickness="1" BorderBrush="Gray">
            <Canvas Name="canvas" Background="Transparent" Height="480">
                <Image Name="grass1" Source="images/grass.png" Height="80" Width="20" Stretch="None" />
                <Image Name="sodRoll1" Canvas.Left="18" Source="images/sodRoll.png" />
                <Image Name="sodRollCap1" Canvas.Left="18" Canvas.Top="43" Source="images/sodRollCap.png" />
                <Image Name="grass2" Canvas.Top="80" Source="images/grass.png" Height="80" Width="20" Stretch="None" />
                <Image Name="sodRoll2" Canvas.Left="18" Canvas.Top="80" Source="images/sodRoll.png" />
                <Image Name="sodRollCap2" Canvas.Left="18" Canvas.Top="123" Source="images/sodRollCap.png" />
                <Image Name="grass3" Canvas.Top="160" Source="images/grass.png" Height="80" Width="20" Stretch="None" />
                <Image Name="sodRoll3" Canvas.Left="18" Canvas.Top="160" Source="images/sodRoll.png" />
                <Image Name="sodRollCap3" Canvas.Left="18" Canvas.Top="203" Source="images/sodRollCap.png" />
                <Image Name="grass4" Canvas.Top="240" Source="images/grass.png" Height="80" Width="20" Stretch="None" />
                <Image Name="sodRoll4" Canvas.Left="18" Canvas.Top="240" Source="images/sodRoll.png" />
                <Image Name="sodRollCap4" Canvas.Left="18" Canvas.Top="283" Source="images/sodRollCap.png" />
                <Image Name="grass5" Canvas.Top="320" Source="images/grass.png" Height="80" Width="20" Stretch="None" />
                <Image Name="sodRoll5" Canvas.Left="18" Canvas.Top="320" Source="images/sodRoll.png" />
                <Image Name="sodRollCap5" Canvas.Left="18" Canvas.Top="363" Source="images/sodRollCap.png" />
                <Image Name="grass6" Canvas.Top="400" Source="images/grass.png" Height="80" Width="20" Stretch="None" />
                <Image Name="sodRoll6" Canvas.Left="18" Canvas.Top="400" Source="images/sodRoll.png" />
                <Image Name="sodRollCap6" Canvas.Left="18" Canvas.Top="443" Source="images/sodRollCap.png" />
                <Grid Name="grid" Background="Transparent" ShowGridLines="True" Height="480" PreviewMouseLeftButtonDown="grid_PreviewMouseLeftButtonDown" PreviewMouseRightButtonDown="grid_PreviewMouseRightButtonDown">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="80" />
                        <RowDefinition Height="80" />
                        <RowDefinition Height="80" />
                        <RowDefinition Height="80" />
                        <RowDefinition Height="80" />
                        <RowDefinition Height="80" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                </Grid>
            </Canvas>
        </Border>
    </StackPanel>
</Window>
