-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSettingsWindow.xaml
More file actions
232 lines (229 loc) · 15.8 KB
/
SettingsWindow.xaml
File metadata and controls
232 lines (229 loc) · 15.8 KB
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
<Window x:Class="SMTAlert.SettingsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="{DynamicResource Settings_Title}" Height="450" Width="500"
WindowStartupLocation="CenterOwner" ResizeMode="NoResize"
Background="#FF232223">
<Grid Background="#FF232223" Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TabControl Background="Transparent">
<TabControl.Resources>
<BooleanToVisibilityConverter x:Key="BoolToVis" />
<Style TargetType="TabItem">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="White" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<Border Name="Border" Background="Transparent" BorderThickness="0,0,0,2"
BorderBrush="Transparent" Padding="8,4" Cursor="Hand">
<ContentPresenter ContentSource="Header"
HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Border" Property="BorderBrush" Value="#FF5588FF" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Border" Property="BorderBrush" Value="#FF888888" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="TextBox">
<Setter Property="Background" Value="#FF333333" />
<Setter Property="Foreground" Value="White" />
<Setter Property="BorderBrush" Value="#FF555555" />
<Setter Property="CaretBrush" Value="White" />
</Style>
<Style TargetType="ComboBox">
<Setter Property="Background" Value="#FF333333" />
<Setter Property="Foreground" Value="White" />
<Setter Property="BorderBrush" Value="#FF555555" />
</Style>
<Style TargetType="ComboBoxItem">
<Setter Property="Foreground" Value="Black" />
<Setter Property="Background" Value="White" />
</Style>
<Style TargetType="Label">
<Setter Property="Foreground" Value="White" />
</Style>
<Style TargetType="CheckBox">
<Setter Property="Foreground" Value="White" />
</Style>
</TabControl.Resources>
<!-- General Tab -->
<TabItem Header="{DynamicResource Settings_Tab_General}">
<StackPanel Margin="10" Orientation="Vertical">
<StackPanel Orientation="Horizontal" Margin="0,5">
<Label Content="{DynamicResource Settings_General_Lang}" Width="120" Foreground="White" />
<ComboBox x:Name="LanguageComboBox" Width="120" SelectionChanged="Language_SelectionChanged"
Foreground="Black" Background="White">
<ComboBoxItem Content="English" Tag="en-US" />
<ComboBoxItem Content="简体中文" Tag="zh-CN" />
</ComboBox>
</StackPanel>
<CheckBox x:Name="AlwaysOnTopChk" Content="{DynamicResource Settings_General_AlwaysOnTop}"
Foreground="White" Margin="0,5" Checked="AlwaysOnTop_Changed" Unchecked="AlwaysOnTop_Changed" />
<CheckBox x:Name="MinimizeToTrayChk" Content="{DynamicResource Settings_General_MinimizeToTray}"
Foreground="White" Margin="0,5" Checked="MinimizeToTray_Changed" Unchecked="MinimizeToTray_Changed" />
<StackPanel Orientation="Horizontal" Margin="0,5">
<Label Content="{DynamicResource Settings_General_LogFolder}" Width="120" Foreground="White" />
<TextBox x:Name="LogFolderTxt" Width="240" TextChanged="LogFolder_Changed" />
<Button x:Name="LogFolderBrowseBtn" Content="..." Width="28" Height="22"
Click="LogFolderBrowse_Click" Margin="3,0,0,0" />
</StackPanel>
<!-- Alert Volume -->
<StackPanel Orientation="Horizontal" Margin="0,12">
<Label Content="{DynamicResource Settings_General_AlertVolume}" Width="120" Foreground="White" />
<Slider x:Name="AlertVolumeSlider" Width="200" Minimum="0" Maximum="100"
ValueChanged="AlertVolume_Changed" />
<Label x:Name="AlertVolumeValue" Content="100%" Width="50" Foreground="White"
HorizontalContentAlignment="Center" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,5">
<Label Content="{DynamicResource Settings_Alert_Channel}" Width="120" Foreground="White" />
<TextBox x:Name="AlertChannelTxt" Width="200" TextChanged="AlertChannel_Changed" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,5">
<Label Content="{DynamicResource Settings_Alert_ClearKeywords}" Width="120" Foreground="White" />
<TextBox x:Name="AlertClearKeywordsTxt" Width="200" TextChanged="AlertClearKeywords_Changed"
ToolTip="{DynamicResource Settings_Alert_ClearKeywordsTip}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,5">
<Label Content="{DynamicResource Settings_Alert_FreshMin}" Width="120" Foreground="White" />
<TextBox x:Name="AlertFreshMinTxt" Width="60" TextChanged="AlertFreshMin_Changed" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,5">
<Label Content="{DynamicResource Settings_Alert_StaleMin}" Width="120" Foreground="White" />
<TextBox x:Name="AlertStaleMinTxt" Width="60" TextChanged="AlertStaleMin_Changed" />
</StackPanel>
</StackPanel>
</TabItem>
<!-- Overlay Tab -->
<TabItem Header="{DynamicResource Settings_Tab_Overlay}">
<StackPanel Margin="10" Orientation="Vertical">
<StackPanel Orientation="Horizontal" Margin="0,5">
<Label Content="{DynamicResource Settings_Ovl_BgOpacity}" Width="160" Foreground="White" />
<Slider x:Name="OverlayBgSlider" Width="200" Minimum="0.05" Maximum="1.0"
ValueChanged="OverlayBg_Changed" />
<Label x:Name="OverlayBgValue" Width="50" Foreground="White" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,5">
<Label Content="{DynamicResource Settings_Ovl_ContentOpacity}" Width="160" Foreground="White" />
<Slider x:Name="OverlayContentSlider" Width="200" Minimum="0.05" Maximum="1.0"
ValueChanged="OverlayContent_Changed" />
<Label x:Name="OverlayContentValue" Width="50" Foreground="White" />
</StackPanel>
<CheckBox x:Name="GathererModeChk" Content="{DynamicResource Settings_Ovl_GathererMode}"
Foreground="White" Margin="0,5" Checked="GathererMode_Changed" Unchecked="GathererMode_Changed" />
<CheckBox x:Name="ShowFullRegionChk" Content="{DynamicResource Settings_Ovl_ShowFullRegion}"
Foreground="White" Margin="0,5" Checked="ShowFullRegion_Changed" Unchecked="ShowFullRegion_Changed" />
<CheckBox x:Name="ShowSysNamesChk" Content="{DynamicResource Settings_Ovl_ShowSysNames}"
Foreground="White" Margin="0,5" Checked="ShowSysNames_Changed" Unchecked="ShowSysNames_Changed" />
</StackPanel>
</TabItem>
<!-- ZKB Tab -->
<TabItem Header="{DynamicResource Settings_Tab_ZKB}">
<StackPanel Margin="10" Orientation="Vertical">
<StackPanel Orientation="Horizontal" Margin="0,5">
<Label Content="{DynamicResource Settings_ZKB_BgOpacity}" Width="160" Foreground="White" />
<Slider x:Name="ZkbBgSlider" Width="200" Minimum="0.05" Maximum="1.0"
ValueChanged="ZkbBg_Changed" />
<Label x:Name="ZkbBgValue" Width="50" Foreground="White" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,5">
<Label Content="{DynamicResource Settings_ZKB_ContentOpacity}" Width="160" Foreground="White" />
<Slider x:Name="ZkbContentSlider" Width="200" Minimum="0.05" Maximum="1.0"
ValueChanged="ZkbContent_Changed" />
<Label x:Name="ZkbContentValue" Width="50" Foreground="White" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,5">
<Label Content="{DynamicResource Settings_ZKB_MaxKills}" Width="160" Foreground="White" />
<TextBox x:Name="ZkbMaxKillsTxt" Width="60" TextChanged="ZkbMaxKills_Changed" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,5">
<Label Content="{DynamicResource Settings_ZKB_ExpireMin}" Width="160" Foreground="White" />
<TextBox x:Name="ZkbExpireTxt" Width="60" TextChanged="ZkbExpire_Changed" />
</StackPanel>
<CheckBox x:Name="ZkbFilterRegionChk" Content="{DynamicResource Settings_ZKB_FilterRegion}"
Foreground="White" Margin="0,5" Checked="ZkbFilterRegion_Changed" Unchecked="ZkbFilterRegion_Changed" />
<StackPanel Orientation="Horizontal" Margin="0,5">
<Label Content="{DynamicResource Settings_ZKB_CustomSystems}" Width="160" Foreground="White" />
<TextBox x:Name="ZkbCustomSystemsTxt" Width="240" TextChanged="ZkbCustomSystems_Changed"
ToolTip="{DynamicResource Settings_ZKB_CustomSystemsTip}" />
</StackPanel>
</StackPanel>
</TabItem>
<!-- Character Alert Settings Tab -->
<TabItem Header="{DynamicResource Settings_Tab_Characters}">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Margin="0,5">
<Button x:Name="AddCharBtn" Content="{DynamicResource Main_Menu_AddChar}"
Click="AddChar_Click" Width="100" />
<Button x:Name="DeleteCharBtn" Content="{DynamicResource Main_CharDelete}"
Click="DeleteChar_Click" Width="100" Margin="10,0,0,0" />
</StackPanel>
<Grid x:Name="CharListGrid" Grid.Row="1" Margin="0,10,0,0">
<ListBox x:Name="CharacterListBox"
Background="#FF1A1A1A" Foreground="White"
SelectionChanged="CharacterList_SelectionChanged">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical" Margin="5">
<StackPanel Orientation="Horizontal">
<TextBlock FontWeight="Bold" Text="{Binding Name}" Foreground="White" />
<TextBlock Text="{DynamicResource Char_ActiveTag}" Foreground="#FF5588FF"
Visibility="{Binding IsActiveMonitor, Converter={StaticResource BoolToVis}}" />
</StackPanel>
<TextBlock Foreground="Gray" Text="{Binding StatusText}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
<Border x:Name="CharSettingsPanel" Grid.Row="1" Margin="0,10,0,0" Visibility="Collapsed"
Background="#FF232223" BorderBrush="#FF444444" BorderThickness="1"
CornerRadius="4" Padding="10">
<StackPanel>
<Button x:Name="CharBackBtn" Content="{DynamicResource Char_Back}" Width="60" Height="24"
Background="Transparent" Foreground="#FF5588FF" BorderThickness="0"
HorizontalAlignment="Left" Click="CharBack_Click" Cursor="Hand"
FontSize="12" Padding="0" />
<StackPanel Margin="0,8,0,0">
<Label Content="{DynamicResource Char_AlertRange}" Foreground="White" />
<Slider x:Name="AlertRangeSlider" Width="300" Minimum="1" Maximum="10"
ValueChanged="AlertRange_Changed" IsSnapToTickEnabled="True" TickFrequency="1" />
<Label x:Name="AlertRangeValue" Foreground="White" />
<CheckBox x:Name="AlertEnabledChk" Content="{DynamicResource Char_AlertEnabled}"
Foreground="White" Margin="0,10" Checked="AlertEnabled_Changed" Unchecked="AlertEnabled_Changed" />
<CheckBox x:Name="IsActiveMonitorChk" Content="{DynamicResource Char_SetActive}"
Foreground="White" Margin="0,10,0,0" Checked="IsActiveMonitor_Checked" Unchecked="IsActiveMonitor_Unchecked" />
</StackPanel>
</StackPanel>
</Border>
</Grid>
</TabItem>
</TabControl>
<Border Grid.Row="1" BorderThickness="0" Padding="0,8,0,0">
<TextBlock Foreground="#FF888888" FontSize="11" HorizontalAlignment="Right">
<Run Text="{DynamicResource Settings_Version}" />
<Run x:Name="VersionText" />
<Run Text=" | " />
<Hyperlink x:Name="RepoLink" NavigateUri="https://github.com/yuruichang/SMTAlert"
RequestNavigate="RepoLink_RequestNavigate" Foreground="#FF5588FF">
GitHub
</Hyperlink>
</TextBlock>
</Border>
</Grid>
</Window>