-
Notifications
You must be signed in to change notification settings - Fork 71
/
ArenaWindow.xaml
236 lines (223 loc) · 16.7 KB
/
ArenaWindow.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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<controls:MetroWindow x:Class="ArenaHelper.ArenaWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:local="clr-namespace:ArenaHelper"
xmlns:localcontrols="clr-namespace:ArenaHelper.Controls"
Title="Arena Helper" Height="255" MinHeight="255" MaxHeight="255" Width="480" MinWidth="480" MaxWidth="480"
Background="{DynamicResource WindowBackground}" Topmost="True" LocationChanged="MetroWindow_LocationChanged" ShowMaxRestoreButton="False">
<controls:MetroWindow.Resources>
<Style TargetType="{x:Type Hyperlink}" BasedOn="{StaticResource {x:Type Hyperlink}}" x:Key="HyperlinkAboutStyle">
<Setter Property="Foreground" Value="#0088ff" />
</Style>
<SolidColorBrush x:Key="WindowBackground" Color="#696969" />
<SolidColorBrush x:Key="SeparatorBackground" Color="#a0a0a0" />
<SolidColorBrush x:Key="PortraitBackground" Color="#a0a0a0" />
<SolidColorBrush x:Key="TextColor" Color="#ffffff" />
</controls:MetroWindow.Resources>
<controls:MetroWindow.RightWindowCommands>
<controls:WindowCommands>
<Button Click="ButtonOptions_Click">
<StackPanel Orientation="Horizontal">
<Rectangle Width="16" Height="16">
<Rectangle.Fill>
<VisualBrush Visual="{StaticResource appbar_settings}" />
</Rectangle.Fill>
</Rectangle>
<TextBlock Margin="4" VerticalAlignment="Center" Text="Options" />
</StackPanel>
</Button>
<Button Click="ButtonAbout_Click">
<StackPanel Orientation="Horizontal">
<Rectangle Width="16" Height="16">
<Rectangle.Fill>
<VisualBrush Visual="{StaticResource appbar_heart}" />
</Rectangle.Fill>
</Rectangle>
<TextBlock Margin="4" VerticalAlignment="Center" Text="About" />
</StackPanel>
</Button>
</controls:WindowCommands>
</controls:MetroWindow.RightWindowCommands>
<controls:MetroWindow.Flyouts>
<controls:FlyoutsControl Margin="{Binding TitleBarMargin, RelativeSource={RelativeSource AncestorType=local:ArenaWindow}}">
<!-- Options -->
<controls:Flyout x:Name="FlyoutOptions" Header="Options" Position="Left" Width="480">
<StackPanel>
<CheckBox x:Name="CheckBoxOverlay" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="8,0,0,0" Checked="CheckBoxOverlay_Checked" Unchecked="CheckBoxOverlay_Unchecked" Content="Show values in overlay" />
<CheckBox x:Name="CheckBoxManual" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="8,8,0,0" Checked="CheckBoxManual_Checked" Unchecked="CheckBoxManual_Unchecked">
<TextBlock TextWrapping="Wrap" VerticalAlignment="Top">Manual card picking<LineBreak />Pick a card in Hearthstone, afterwards, click the card in the Arena Helper window. Don't detect picks automatically.</TextBlock>
</CheckBox>
<CheckBox x:Name="CheckBoxAutoSave" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="8,8,0,0" Checked="CheckBoxAutoSave_Checked" Unchecked="CheckBoxAutoSave_Unchecked" Content="Automatically save and use the deck" />
</StackPanel>
</controls:Flyout>
<!-- About -->
<controls:Flyout x:Name="FlyoutAbout" Header="About" CloseButtonVisibility="Collapsed" Position="Left" Width="480">
<StackPanel Margin="5">
<TextBlock Margin="10,5,10,15" FontWeight="SemiBold" FontSize="13" TextWrapping="Wrap">
<Run Text="Arena Helper " /><Run Text="{Binding StringVersion, Mode=OneWay}" /><Run Text=" was made by Rembound" />
<Run Text="with support from the community at GitHub." />
<Run Text="The Tier List which is used in Arena Helper was shut down by the creators, as a result there will be no more updates." />
<LineBreak /><LineBreak />
<Run Text="Thanks for your support!" />
</TextBlock>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button Name="AboutVisitGitHub" Content="github" Width="60" Margin="0,0,0,0" Height="30" Style="{DynamicResource SquareButtonStyle}" Click="AboutVisitGitHub_Click"/>
<Button Name="AboutButtonClose" Content="close" Width="60" Margin="10,0,0,0" Height="30" Style="{DynamicResource SquareButtonStyle}" Click="AboutButtonClose_Click"/>
</StackPanel>
</StackPanel>
</controls:Flyout>
<!-- Update -->
<controls:Flyout x:Name="FlyoutUpdate" Header="Update available!" CloseButtonVisibility="Collapsed" Position="Left" Width="480">
<StackPanel Margin="5">
<TextBlock x:Name="UpdateText" Margin="10,5,10,15" FontWeight="SemiBold" FontSize="13" TextWrapping="Wrap">
<Run Text="Press "download" to automatically download and install the new update. This will restart Hearthstone Deck Tracker." />
</TextBlock>
<StackPanel x:Name="UpdateButtons" Orientation="Horizontal" HorizontalAlignment="Center">
<Button Name="UpdateDownload" Content="download" Width="70" Margin="0,0,0,0" Height="30" Style="{DynamicResource AccentedSquareButtonStyle}" Click="UpdateDownload_Click"/>
<Button Name="UpdateWebsite" Content="website" Margin="10,0,0,0" Width="70" Height="30" Style="{DynamicResource SquareButtonStyle}" Click="UpdateWebsite_Click"/>
<Button Name="UpdateClose" Content="close" Width="70" Margin="10,0,0,0" Height="30" Style="{DynamicResource SquareButtonStyle}" Click="UpdateClose_Click"/>
</StackPanel>
</StackPanel>
</controls:Flyout>
<!-- Data Update -->
<controls:Flyout x:Name="FlyoutDataUpdate" Header="Data update applied!" CloseButtonVisibility="Collapsed" Position="Left" Width="480">
<StackPanel Margin="5">
<TextBlock Margin="10,5,10,15" FontWeight="SemiBold" FontSize="13" TextWrapping="Wrap">
<Run Text="The tier list and card data was updated to the latest version." />
<LineBreak /><LineBreak />
<Run Text="Thanks for your support!" />
</TextBlock>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button Name="DataUpdateGitHub" Content="github" Width="60" Margin="0,0,0,0" Height="30" Style="{DynamicResource SquareButtonStyle}" Click="AboutVisitGitHub_Click"/>
<Button Name="DataUpdateClose" Content="close" Width="60" Margin="10,0,0,0" Height="30" Style="{DynamicResource SquareButtonStyle}" Click="DataUpdateClose_Click"/>
</StackPanel>
</StackPanel>
</controls:Flyout>
</controls:FlyoutsControl>
</controls:MetroWindow.Flyouts>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- Top Panel -->
<StackPanel Grid.Row="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<WrapPanel Grid.Column="0">
<Border Height="40" Width="40" Background="{DynamicResource PortraitBackground}" Margin="4" MouseUp="ConfigureHero_MouseUp" >
<Grid>
<Image x:Name="PickedHeroImage" Width="32" Height="32" />
</Grid>
</Border>
<Label x:Name="DeckName" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{DynamicResource TextColor}" Content="Deckname" FontSize="14" Margin="0" />
</WrapPanel>
<WrapPanel Grid.Column="1" VerticalAlignment="Center">
<Button x:Name="Button1" Width="74" Content="New Arena" Margin="0 0 8 0" Click="ButtonNewArena_Click" />
<Button x:Name="Button2" Width="74" Content="Save Deck" Margin="0 0 8 0" Click="ButtonSave_Click" />
</WrapPanel>
</Grid>
<Separator Background="{DynamicResource SeparatorBackground}" />
</StackPanel>
<!-- DetectingPanel -->
<Grid x:Name="DetectingPanel" Grid.Row="1" Width="200" Visibility="Hidden">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<local:OutlinedTextBlock Grid.Row="0" x:Name="DetectingHeader" HorizontalAlignment="Center" FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT" FontSize="20" Text="Title" Margin="0,8,0,0" />
<TextBlock Grid.Row="1" x:Name="DetectingText" TextWrapping="Wrap" TextAlignment="Center" Foreground="{DynamicResource TextColor}" Margin="0,12,0,0">text</TextBlock>
<TextBlock Grid.Row="2" x:Name="DetectingText2" TextWrapping="Wrap" TextAlignment="Center" Foreground="{DynamicResource TextColor}" Margin="0,20,0,0">text</TextBlock>
</Grid>
<!-- HeroPanel -->
<StackPanel x:Name="HeroPanel" Grid.Row="1" Width="200" Visibility="Hidden">
<local:OutlinedTextBlock HorizontalAlignment="Center" FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT" FontSize="20" Text="Detected Heroes" Margin="0,8,0,0" />
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<localcontrols:Hero Grid.Row="0" Grid.Column="0" Margin="0,16,0,0" x:Name="Hero0" VerticalAlignment="Top" />
<localcontrols:Hero Grid.Row="0" Grid.Column="1" Margin="0,16,0,0" x:Name="Hero1" VerticalAlignment="Top" />
<localcontrols:Hero Grid.Row="0" Grid.Column="2" Margin="0,16,0,0" x:Name="Hero2" VerticalAlignment="Top" />
</Grid>
<TextBlock x:Name="DetectedHeroesWarning" TextWrapping="Wrap" TextAlignment="Center" Foreground="{DynamicResource TextColor}" Margin="0,20,0,0">text</TextBlock>
</StackPanel>
<!-- ConfigureHeroPanel -->
<StackPanel x:Name="ConfigureHeroPanel" Grid.Row="1" Width="360" Visibility="Hidden">
<local:OutlinedTextBlock HorizontalAlignment="Center" FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT" FontSize="20" Text="Select Hero" Margin="0,0,0,0" />
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- -->
<localcontrols:Hero Margin="0,4,0,0" Grid.Row="0" Grid.Column="0" x:Name="CHero0" VerticalAlignment="Top" />
<localcontrols:Hero Margin="0,4,0,0" Grid.Row="0" Grid.Column="1" x:Name="CHero1" VerticalAlignment="Top" />
<localcontrols:Hero Margin="0,4,0,0" Grid.Row="0" Grid.Column="2" x:Name="CHero2" VerticalAlignment="Top" />
<localcontrols:Hero Margin="0,4,0,0" Grid.Row="0" Grid.Column="3" x:Name="CHero3" VerticalAlignment="Top" />
<localcontrols:Hero Margin="0,4,0,0" Grid.Row="0" Grid.Column="4" x:Name="CHero4" VerticalAlignment="Top" />
<!-- -->
<localcontrols:Hero Margin="0,6,0,0" Grid.Row="1" Grid.Column="0" x:Name="CHero5" VerticalAlignment="Top" />
<localcontrols:Hero Margin="0,6,0,0" Grid.Row="1" Grid.Column="1" x:Name="CHero6" VerticalAlignment="Top" />
<localcontrols:Hero Margin="0,6,0,0" Grid.Row="1" Grid.Column="2" x:Name="CHero7" VerticalAlignment="Top" />
<localcontrols:Hero Margin="0,6,0,0" Grid.Row="1" Grid.Column="3" x:Name="CHero8" VerticalAlignment="Top" />
<localcontrols:Hero Margin="0,6,0,0" Grid.Row="1" Grid.Column="4" x:Name="CHero9" VerticalAlignment="Top" />
<localcontrols:Hero Margin="0,6,0,0" Grid.Row="1" Grid.Column="5" x:Name="CHero10" VerticalAlignment="Top" />
</Grid>
</StackPanel>
<!-- CardPanel -->
<Grid x:Name="CardPanel" Grid.Row="1" HorizontalAlignment="Left" Visibility="Hidden">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<localcontrols:DeckRating x:Name="DeckRatingControl0" Grid.Column="0" Margin="16,0,0,0" />
<StackPanel Grid.Column="1" Margin="24,0,0,0">
<local:OutlinedTextBlock x:Name="Header" HorizontalAlignment="Center" FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT" FontSize="20" Text="header" Margin="0,8,0,0" />
<localcontrols:Card x:Name="CardControl0" DataContext="{Binding Card0}" HorizontalAlignment="Center" Margin="0,15,0,0" MouseUp="CardControl0_MouseUp" />
<localcontrols:Card x:Name="CardControl1" DataContext="{Binding Card1}" HorizontalAlignment="Center" Margin="0,4,0,0" MouseUp="CardControl1_MouseUp" />
<localcontrols:Card x:Name="CardControl2" DataContext="{Binding Card2}" HorizontalAlignment="Center" Margin="0,4,0,0" MouseUp="CardControl2_MouseUp" />
</StackPanel>
<StackPanel Grid.Column="2" Visibility="Visible" HorizontalAlignment="Center" Margin="24,0,0,0">
<local:OutlinedTextBlock HorizontalAlignment="Center" FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT" FontSize="20" Text="Value" Margin="0,8,0,0" />
<Label x:Name="Value0" Height="34" VerticalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{DynamicResource TextColor}" Content="80" FontSize="14" Margin="0,14,0,0" />
<Label x:Name="Value1" Height="34" VerticalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{DynamicResource TextColor}" Content="80" FontSize="14" Margin="0,4,0,0" />
<Label x:Name="Value2" Height="34" VerticalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{DynamicResource TextColor}" Content="80" FontSize="14" Margin="0,4,0,0" />
</StackPanel>
</Grid>
<!-- DonePanel -->
<Grid x:Name="DonePanel" Grid.Row="1" HorizontalAlignment="Left" Visibility="Hidden">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<localcontrols:DeckRating x:Name="DeckRatingControl1" Grid.Column="0" Margin="16,0,0,0" />
<Grid Grid.Column="1" HorizontalAlignment="Center" Margin="72,0,16,0">
<StackPanel Grid.Column="1" >
<local:OutlinedTextBlock HorizontalAlignment="Center" FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT" FontSize="20" Text="Done" Margin="0,8,0,0" />
<TextBlock TextWrapping="Wrap" Width="200" TextAlignment="Center" Foreground="{DynamicResource TextColor}" Margin="0,12,0,0">All cards are picked. You can start a new arena run or save the deck.</TextBlock>
</StackPanel>
</Grid>
</Grid>
</Grid>
</controls:MetroWindow>