-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathDialogWindow.xaml
208 lines (208 loc) · 11.7 KB
/
DialogWindow.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="BetterHI3Launcher.DialogWindow"
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"
mc:Ignorable="d"
WindowStyle="None"
ResizeMode="NoResize"
AllowsTransparency="True"
Background="#80000000"
Closing="DialogWindow_Closing"
UseLayoutRounding="True"
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="ClearType"
ShowInTaskbar="False"
Title="DialogWindow" Width="1280" Height="730">
<Window.Resources>
<FontFamily x:Key="Font">/BetterHI3Launcher;component/Assets/Fonts/#FZLanTingHei-B-GBK</FontFamily>
<ImageBrush x:Key="ButtonDialog" ImageSource="/Assets/Images/Button_Dialog.png"/>
<ImageBrush x:Key="ButtonDialogPressed" ImageSource="/Assets/Images/Button_Dialog_Pressed.png"/>
<ImageBrush x:Key="ButtonDialogDisabled" ImageSource="/Assets/Images/Button_Dialog_Disabled.png"/>
<Style x:Key="FocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle UseLayoutRounding="true" StrokeThickness="2" Stroke="{DynamicResource {x:Static SystemColors.MenuHighlightBrushKey}}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ButtonStyle" TargetType="{x:Type Button}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Background" Value="{StaticResource ButtonDialog}"/>
<Setter Property="BorderBrush" Value="{x:Null}"/>
<Setter Property="Foreground" Value="#313131"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
<Setter Property="Margin" Value="15,0"/>
<Setter Property="FontFamily" Value="{DynamicResource Font}"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" SnapsToDevicePixels="true">
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsDefaulted" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource ButtonDialogPressed}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="border" Value="{StaticResource ButtonDialogDisabled}"/>
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="#333333"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="CloseButtonStyle" TargetType="{x:Type Button}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="{x:Null}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="Width" Value="52"/>
<Setter Property="Height" Value="38"/>
<Setter Property="FontFamily" Value="{DynamicResource Font}"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" SnapsToDevicePixels="true">
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type CheckBox}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Width" Value="24"/>
<Setter Property="Height" Value="16"/>
<Setter Property="Margin" Value="5"/>
<Setter Property="UseLayoutRounding" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
<StackPanel Orientation="Horizontal">
<Image x:Name="Image" Source="/Assets/Images/Checkbox_On.png"/>
<ContentPresenter/>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Image" Property="Source" Value="/Assets/Images/Checkbox_On.png"/>
</Trigger>
<Trigger Property="IsChecked" Value="False">
<Setter TargetName="Image" Property="Source" Value="/Assets/Images/Checkbox_Off.png"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Image" Property="Source" Value="/Assets/Images/Checkbox_Disabled.png"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type RadioButton}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Width" Value="21"/>
<Setter Property="Height" Value="16"/>
<Setter Property="Margin" Value="5"/>
<Setter Property="UseLayoutRounding" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RadioButton}">
<StackPanel Orientation="Horizontal">
<Image x:Name="Image" Source="/Assets/Images/Checkbox_On.png"/>
<ContentPresenter/>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Image" Property="Source" Value="/Assets/Images/Checkbox_On.png"/>
</Trigger>
<Trigger Property="IsChecked" Value="False">
<Setter TargetName="Image" Property="Source" Value="/Assets/Images/Checkbox_Off.png"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Image" Property="Source" Value="/Assets/Images/Checkbox_Disabled.png"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type TextBox}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="FontFamily" Value="{DynamicResource Font}"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBoxBase}">
<Border Name="Border" CornerRadius="3" Padding="1">
<Border.Background>
<SolidColorBrush Color="White" />
</Border.Background>
<ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid Width="576" Height="307">
<Image Source="Assets/Images/Window_Dialog.png"/>
<TextBlock Name="DialogTitle" VerticalAlignment="Top" Margin="85,29,85,0" Foreground="White" FontFamily="{DynamicResource Font}" FontSize="18" TextAlignment="Center"/>
<ScrollViewer Name="DialogMessageScrollViewer" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,0,25" Width="500" Height="135" Focusable="False" ScrollViewer.VerticalScrollBarVisibility="Hidden">
<TextBlock Name="DialogMessage" VerticalAlignment="Center" HorizontalAlignment="Center" MaxWidth="500" MaxHeight="147" Foreground="White" FontFamily="{DynamicResource Font}" FontSize="16" TextAlignment="Center" TextWrapping="Wrap"/>
</ScrollViewer>
<StackPanel Name="InstallStackPanel" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,25,0,0" Visibility="Collapsed">
<StackPanel Orientation="Horizontal">
<TextBox Name="InstallPathTextBox" Width="380" Height="20" TextChanged="InstallPathTextBox_TextChanged"/>
<Button Style="{DynamicResource ButtonStyle}" Height="20" Margin="5,0,0,0" FontSize="16" Content="..." Click="BrowseButton_Click"/>
</StackPanel>
</StackPanel>
<StackPanel Name="UninstallStackPanel" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,25,0,0" Visibility="Collapsed">
<StackPanel Orientation="Horizontal">
<CheckBox Name="UninstallGameFilesCheckBox" IsChecked="True" Click="UninstallCheckBox_Click" x:FieldModifier="public"/>
<TextBlock Name="UninstallGameFilesLabel" VerticalAlignment="Center" Foreground="White" FontFamily="{DynamicResource Font}" FontSize="16"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<CheckBox Name="UninstallGameCacheCheckBox" IsChecked="True" Click="UninstallCheckBox_Click" x:FieldModifier="public"/>
<TextBlock Name="UninstallGameCacheLabel" VerticalAlignment="Center" Foreground="White" FontFamily="{DynamicResource Font}" FontSize="16"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<CheckBox Name="UninstallGameSettingsCheckBox" IsChecked="True" Click="UninstallCheckBox_Click" x:FieldModifier="public"/>
<TextBlock Name="UninstallGameSettingsLabel" VerticalAlignment="Center" Foreground="White" FontFamily="{DynamicResource Font}" FontSize="16"/>
</StackPanel>
</StackPanel>
<StackPanel Name="CustomLaunchOptionsStackPanel" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,50,0,0" Visibility="Collapsed">
<StackPanel Orientation="Horizontal">
<TextBox Name="CustomLaunchOptionsTextBox" Width="400" Height="20" MaxLength="256"/>
</StackPanel>
</StackPanel>
<StackPanel Name="CustomBackgroundStackPanel" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,35,0,0" Visibility="Collapsed">
<StackPanel Orientation="Horizontal">
<RadioButton Name="CustomBackgroundEditRadioButton" GroupName="CustomBackgroundActionChoice" IsChecked="True" Click="CustomBackgroundRadioButton_Click" x:FieldModifier="public"/>
<TextBlock Name="CustomBackgroundEditLabel" Foreground="White" VerticalAlignment="Center" FontFamily="{DynamicResource Font}" FontSize="16"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<RadioButton Name="CustomBackgroundDeleteRadioButton" GroupName="CustomBackgroundActionChoice" Click="CustomBackgroundRadioButton_Click" x:FieldModifier="public"/>
<TextBlock Name="CustomBackgroundDeleteLabel" Foreground="White" VerticalAlignment="Center" FontFamily="{DynamicResource Font}" FontSize="16"/>
</StackPanel>
</StackPanel>
<Button Name="CloseButton" Style="{DynamicResource CloseButtonStyle}" Margin="0,23,33,0" Click="CloseButton_Click"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="36">
<Button Name="ConfirmButton" Style="{DynamicResource ButtonStyle}" Width="189" Height="44" Click="ConfirmButton_Click"/>
<Button Name="CancelButton" Style="{DynamicResource ButtonStyle}" Width="189" Height="44" Click="CloseButton_Click"/>
</StackPanel>
</Grid>
</Window>