-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
208 lines (196 loc) · 10.9 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<Window x:Class="cactpot_gui.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:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:ddb="clr-namespace:DropDownButtonExample"
mc:Ignorable="d"
Icon="graphics/coin_8.png"
Title="Mini Cactpot Solver" Height="450" Width="800">
<Window.Resources>
<ContextMenu x:Key="SlotButtonContextMenu">
<MenuItem Header="1" Click="mi_click" />
<MenuItem Header="2" Click="mi_click" />
<MenuItem Header="3" Click="mi_click" />
<MenuItem Header="4" Click="mi_click" />
<MenuItem Header="5" Click="mi_click" />
<MenuItem Header="6" Click="mi_click" />
<MenuItem Header="7" Click="mi_click" />
<MenuItem Header="8" Click="mi_click" />
<MenuItem Header="9" Click="mi_click" />
</ContextMenu>
<Style x:Key="ButtonStyle" TargetType="Button">
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="Background" Value="WhiteSmoke" />
<Setter Property="Foreground" Value="#EA0CEB" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid Background="{TemplateBinding Background}">
<ContentPresenter x:Name="MyContentPresenter"
Content="{TemplateBinding Content}"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="1" />
<Setter Property="Foreground" Value="#15EDAA" />
<Setter Property="Background" Value="WhiteSmoke" />
</Trigger>
<Trigger Property="Control.Tag" Value="Uncovered">
<Setter Property="Foreground" Value="#315F42" />
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<DockPanel>
<Menu DockPanel.Dock="Top">
<MenuItem Header="_File">
<MenuItem Header="_Reset" Click="mnuReset_Click" />
</MenuItem>
</Menu>
<Grid Background="WhiteSmoke">
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="2*" />
<RowDefinition Height="2*" />
<RowDefinition Height="2*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<Button Name="btn_down_right" Grid.Row="0" Grid.Column="0" Padding="0,0" IsEnabled="false" Style="{StaticResource ButtonStyle}">
<Image Source="graphics/edgy-16x16-arrow_down_right.png" />
</Button>
<Button Name="btn_down_1" Grid.Row="0" Grid.Column="1" Padding="0,0" IsEnabled="false" Style="{StaticResource ButtonStyle}">
<Image Source="graphics/edgy-16x16-arrow_down.png" />
</Button>
<Button Name="btn_down_2" Grid.Row="0" Grid.Column="2" Padding="0,0" IsEnabled="false" Style="{StaticResource ButtonStyle}">
<Image Source="graphics/edgy-16x16-arrow_down.png" />
</Button>
<Button Name="btn_down_3" Grid.Row="0" Grid.Column="3" Padding="0,0" IsEnabled="false" Style="{StaticResource ButtonStyle}">
<Image Source="graphics/edgy-16x16-arrow_down.png" />
</Button>
<Button Name="btn_down_left" Grid.Row="0" Grid.Column="4" Padding="0,0" IsEnabled="false" Style="{StaticResource ButtonStyle}">
<Image Source="graphics/edgy-16x16-arrow_down_left.png" />
</Button>
<Button Name="btn_right_1" Grid.Row="1" Grid.Column="0" Padding="0,0" IsEnabled="false" Style="{StaticResource ButtonStyle}">
<Image Source="graphics/edgy-16x16-arrow_right.png" />
</Button>
<Button Name="btn_id_0" Grid.Row="1" Grid.Column="1" Padding="0,0" Tag="0" ContextMenu="{StaticResource SlotButtonContextMenu}" Style="{StaticResource ButtonStyle}">
<i:Interaction.Behaviors>
<ddb:DropDownButtonBehavior />
</i:Interaction.Behaviors>
<Button.Content>
<Grid>
<Image Source="graphics/coin_7.png" />
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold">?</TextBlock>
</Grid>
</Button.Content>
</Button>
<Button Name="btn_id_1" Grid.Row="1" Grid.Column="2" Padding="0,0" Tag="1" ContextMenu="{StaticResource SlotButtonContextMenu}" Style="{StaticResource ButtonStyle}">
<i:Interaction.Behaviors>
<ddb:DropDownButtonBehavior />
</i:Interaction.Behaviors>
<Button.Content>
<Grid>
<Image Source="graphics/coin_7.png" />
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold">?</TextBlock>
</Grid>
</Button.Content>
</Button>
<Button Name="btn_id_2" Grid.Row="1" Grid.Column="3" Padding="0,0" Tag="2" ContextMenu="{StaticResource SlotButtonContextMenu}" Style="{StaticResource ButtonStyle}">
<i:Interaction.Behaviors>
<ddb:DropDownButtonBehavior />
</i:Interaction.Behaviors>
<Button.Content>
<Grid>
<Image Source="graphics/coin_7.png" />
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold">?</TextBlock>
</Grid>
</Button.Content>
</Button>
<Button Name="btn_right_2" Grid.Row="2" Grid.Column="0" Padding="0,0" IsEnabled="false" Style="{StaticResource ButtonStyle}">
<Image Source="graphics/edgy-16x16-arrow_right.png" />
</Button>
<Button Name="btn_id_3" Grid.Row="2" Grid.Column="1" Padding="0,0" Tag="3" ContextMenu="{StaticResource SlotButtonContextMenu}" Style="{StaticResource ButtonStyle}">
<i:Interaction.Behaviors>
<ddb:DropDownButtonBehavior />
</i:Interaction.Behaviors>
<Button.Content>
<Grid>
<Image Source="graphics/coin_7.png" />
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold">?</TextBlock>
</Grid>
</Button.Content>
</Button>
<Button Name="btn_id_4" Grid.Row="2" Grid.Column="2" Padding="0,0" Tag="4" ContextMenu="{StaticResource SlotButtonContextMenu}" Style="{StaticResource ButtonStyle}">
<i:Interaction.Behaviors>
<ddb:DropDownButtonBehavior />
</i:Interaction.Behaviors>
<Button.Content>
<Grid>
<Image Source="graphics/coin_7.png" />
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold">?</TextBlock>
</Grid>
</Button.Content>
</Button>
<Button Name="btn_id_5" Grid.Row="2" Grid.Column="3" Padding="0,0" Tag="5" ContextMenu="{StaticResource SlotButtonContextMenu}" Style="{StaticResource ButtonStyle}">
<i:Interaction.Behaviors>
<ddb:DropDownButtonBehavior />
</i:Interaction.Behaviors>
<Button.Content>
<Grid>
<Image Source="graphics/coin_7.png" />
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold">?</TextBlock>
</Grid>
</Button.Content>
</Button>
<Button Name="btn_right_3" Grid.Row="3" Grid.Column="0" Padding="0,0" IsEnabled="false" Style="{StaticResource ButtonStyle}">
<Image Source="graphics/edgy-16x16-arrow_right.png" />
</Button>
<Button Name="btn_id_6" Grid.Row="3" Grid.Column="1" Padding="0,0" Tag="6" ContextMenu="{StaticResource SlotButtonContextMenu}" Style="{StaticResource ButtonStyle}">
<i:Interaction.Behaviors>
<ddb:DropDownButtonBehavior />
</i:Interaction.Behaviors>
<Button.Content>
<Grid>
<Image Source="graphics/coin_7.png" />
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold">?</TextBlock>
</Grid>
</Button.Content>
</Button>
<Button Name="btn_id_7" Grid.Row="3" Grid.Column="2" Padding="0,0" Tag="7" ContextMenu="{StaticResource SlotButtonContextMenu}" Style="{StaticResource ButtonStyle}">
<i:Interaction.Behaviors>
<ddb:DropDownButtonBehavior />
</i:Interaction.Behaviors>
<Button.Content>
<Grid>
<Image Source="graphics/coin_7.png" />
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold">?</TextBlock>
</Grid>
</Button.Content>
</Button>
<Button Name="btn_id_8" Grid.Row="3" Grid.Column="3" Padding="0,0" Tag="8" ContextMenu="{StaticResource SlotButtonContextMenu}" Style="{StaticResource ButtonStyle}">
<i:Interaction.Behaviors>
<ddb:DropDownButtonBehavior />
</i:Interaction.Behaviors>
<Button.Content>
<Grid>
<Image Source="graphics/coin_7.png" />
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold">?</TextBlock>
</Grid>
</Button.Content>
</Button>
</Grid>
</DockPanel>
</Window>