forked from Slazanger/SMT
-
Notifications
You must be signed in to change notification settings - Fork 1
/
RegionControl.xaml
444 lines (392 loc) · 30.4 KB
/
RegionControl.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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
<UserControl x:Class="SMT.RegionControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dotNetKitControls="clr-namespace:DotNetKit.Windows.Controls;assembly=DotNetKit.Wpf.AutoCompleteComboBox"
xmlns:zoombox1="clr-namespace:WpfHelpers.WpfControls.Zoombox;assembly=WpfHelpers"
xmlns:local="clr-namespace:SMT"
xmlns:diag="clr-namespace:System.Diagnostics;assembly=WindowsBase"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="800">
<UserControl.Resources>
<BooleanToVisibilityConverter x:Key="BoolToVis" />
<ContextMenu x:Key="SysRightClickContextMenu">
<ContextMenu.ItemTemplate>
<DataTemplate>
<Grid Margin="-20,0,-40,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="20" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Ident}" />
<TextBlock Grid.Column="1" Text="{Binding Description}" />
</Grid>
</DataTemplate>
</ContextMenu.ItemTemplate>
<MenuItem Header="{Binding Name}" FontWeight="Bold" />
<Separator />
<MenuItem Header="Set Destination" Click="SysContexMenuItemSetDestination_Click" IsEnabled="False" />
<MenuItem Header="Add Waypoint" Click="SysContexMenuItemAddWaypoint_Click" IsEnabled="False" />
<MenuItem Header="Clear Route" Click="SysContexMenuItemClearRoute_Click" IsEnabled="False" />
<MenuItem Header="Characters" IsEnabled="False" />
<MenuItem Header="Show Jump Range">
<MenuItem Header="Remove All" DataContext="-1" Click="SetJumpRange_Click" />
<MenuItem Header="None" DataContext="0" Click="SetJumpRange_Click" />
<MenuItem Header="Super/Titan (6.0LY)" DataContext="6" Click="SetJumpRange_Click" />
<MenuItem Header="Carriers/Fax (7.0LY)" DataContext="7" Click="SetJumpRange_Click" />
<MenuItem Header="Black Ops (8.0LY)" DataContext="8" Click="SetJumpRange_Click" />
<MenuItem Header="JF/Rorq (10.0LY)" DataContext="10" Click="SetJumpRange_Click" />
</MenuItem>
<Separator />
<MenuItem Header="DotLan" Click="SysContexMenuItemDotlan_Click" />
<MenuItem Header="ZKillBoard" Click="SysContexMenuItemZKB_Click" />
<MenuItem Header="Copy Name" Click="SysContexMenuItemCopy_Click" />
<MenuItem Header="Show In Universe" Click="SysContexMenuItemShowInUniverse_Click" />
</ContextMenu>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Margin="4,2,1,2" Orientation="Horizontal" HorizontalAlignment="Left">
<ComboBox x:Name="RegionSelectCB" Width="120" Margin="5,0" FontSize="12" SelectionChanged="RegionSelectCB_SelectionChanged" />
<ComboBox x:Name="SystemDropDownAC" IsEditable="True" Text="System" Width="100" FontSize="12" Margin="5,0" SelectionChanged="SystemDropDownAC_SelectionChanged" />
<Label Content="Search :" HorizontalAlignment="Center" VerticalAlignment="Center" />
<dotNetKitControls:AutoCompleteComboBox x:Name="GlobalSystemDropDownAC" Width="200" FontSize="12" Margin="5,0" SelectionChanged="GlobalSystemDropDownAC_SelectionChanged" Foreground="Black" TextSearch.TextPath="Name">
<dotNetKitControls:AutoCompleteComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</dotNetKitControls:AutoCompleteComboBox.ItemsPanel>
</dotNetKitControls:AutoCompleteComboBox>
<CheckBox x:Name="FollowCharacterChk" Margin="5,-1,5,0" Content="Auto Follow Active Character" HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="False" Checked="FollowCharacterChk_Checked" />
<Separator />
</StackPanel>
<Grid x:Name="MainCanvasGrid" ClipToBounds="True" Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="600*" />
<ColumnDefinition Width="7*" />
<ColumnDefinition Width="193*" />
</Grid.ColumnDefinitions>
<zoombox1:ZoomControl x:Name="MainZoomControl" MinZoom="0.2" MaxZoom="10" Margin="0" Grid.ColumnSpan="3">
<Canvas x:Name="MainCanvas" Margin="5" Width="1050" Height="800" />
</zoombox1:ZoomControl>
<Label x:Name="label" HorizontalAlignment="Right" Margin="0,0,50,0" VerticalAlignment="Bottom" FontSize="30" Panel.ZIndex="50" FontWeight="Bold" Grid.Column="2" />
<StackPanel x:Name="BridgeInfoStackPanel" HorizontalAlignment="Left" Margin="20,0,0,20" VerticalAlignment="Bottom" Panel.ZIndex="50" />
<Ellipse x:Name="helpIcon" Width="20" Height="20" Fill="Black" HorizontalAlignment="Right" VerticalAlignment="Top" Grid.Column="2" Margin="20" />
<Label Content="?" Width="18" Height="26" HorizontalAlignment="Right" VerticalAlignment="Top" Grid.Column="2" Margin="0,17,20,0" IsHitTestVisible="false" FontSize="14" FontWeight="Bold" x:Name="HelpQM" />
<Border BorderThickness="2" BorderBrush="Black" Background="#FF232223" CornerRadius="3" HorizontalAlignment="Right" VerticalAlignment="top" Margin="0,46,20,0" x:Name="HelpList" Visibility="Hidden" Width="175" Panel.ZIndex="111" Grid.Column="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="25" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Ellipse Width="15" Height="15" Fill="LightGray" Stroke="Black" StrokeThickness="2" Grid.Row="0" Grid.Column="0" />
<Label Content="System" Grid.Row="0" Grid.Column="1" />
<Rectangle Width="15" Height="15" Fill="LightGray" Stroke="Black" StrokeThickness="2" Grid.Row="1" Grid.Column="0" />
<Label Content="System with NPC Station" Grid.Row="1" Grid.Column="1" />
<Rectangle Width="20" Height="20" Fill="LightGray" StrokeThickness="2" Grid.Row="2" Grid.Column="0" />
<Image Source="Images/Jove_logo.png" Grid.Row="2" Grid.Column="0" Width="15" Height="15" SnapsToDevicePixels="True" />
<Label Content="Jove Observatory" Grid.Row="2" Grid.Column="1" />
<Ellipse Width="20" Height="20" Stroke="Green" StrokeThickness="2.5" Grid.Row="3" Grid.Column="0" />
<Label Content="Thera Entrance" Grid.Row="3" Grid.Column="1" />
<Rectangle Width="15" Height="15" Fill="LightBlue" StrokeThickness="2" Grid.Row="4" Grid.Column="0" />
<Label Content="Ice Belts" Grid.Row="4" Grid.Column="1" />
<Polygon Points="0,14,7,0,14,14" Width="15" Height="15" Fill="DarkRed" Stroke="Black" StrokeThickness="2" Grid.Row="5" Grid.Column="0" />
<Label Content="Trig Invasion" Grid.Row="5" Grid.Column="1" />
</Grid>
</Border>
<Border BorderThickness="4" BorderBrush="Black" CornerRadius="3" Grid.ColumnSpan="3" />
<Border BorderThickness="2" BorderBrush="Black" Background="#FF232223" CornerRadius="3" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,20,160" x:Name="AllianceNameList" Visibility="Visible" Width="190" Panel.ZIndex="111" Grid.ColumnSpan="3">
<StackPanel x:Name="AllianceNameListStackPanel" VerticalAlignment="Bottom" />
</Border>
<Border BorderThickness="2" BorderBrush="Black" Background="#FF232223" Width="190" Height="130" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,20,20" CornerRadius="4" Panel.ZIndex="111" Visibility="{Binding Path=MapConf.ShowToolBox, Converter={StaticResource BoolToVis}}" Grid.ColumnSpan="3">
<Canvas x:Name="ToolBoxCanvas">
<Grid Canvas.Left="0" Canvas.Top="2" Width="210">
<StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,0,0,0" Width="190">
<Label x:Name="RegionNameLabel" Content="Region" FontSize="16" Grid.Column="1" Margin="0,0" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FF767576" FontFamily="Ebrima" />
<StackPanel Orientation="Horizontal" Margin="1,1" HorizontalAlignment="Center" VerticalAlignment="Center">
<ToggleButton x:Name="ToggleADMBtn" Margin="1,0" Background="{x:Null}" BorderThickness="0" IsChecked="{Binding Path=ShowSystemADM}" ToolTip="Show System ADM" Width="30" Height="30">
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Transparent">
</SolidColorBrush>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
<Image>
<Image.Style>
<Style TargetType="Image">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=ToggleADMBtn,Path=IsChecked}" Value="True">
<Setter Property="Image.Source" Value="Images/ADM.png" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=ToggleADMBtn,Path=IsChecked}" Value="false">
<Setter Property="Image.Source" Value="Images/ADM Inactive.png" />
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</ToggleButton>
<ToggleButton x:Name="ToggleSecurityBtn" Margin="1,0" Background="{x:Null}" BorderThickness="0" IsChecked="{Binding Path=ShowSystemSecurity}" ToolTip="Show System Security" Width="30" Height="30">
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Transparent">
</SolidColorBrush>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
<Image>
<Image.Style>
<Style TargetType="Image">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=ToggleSecurityBtn,Path=IsChecked}" Value="True">
<Setter Property="Image.Source" Value="Images/Security.png" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=ToggleSecurityBtn,Path=IsChecked}" Value="false">
<Setter Property="Image.Source" Value="Images/Security Inactive.png" />
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</ToggleButton>
<ToggleButton x:Name="ToggleSOVBtn" Margin="1,0" BorderThickness="0" IsChecked="{Binding Path=ShowSovOwner}" ToolTip="Show Sov Owners" Width="30" Height="30">
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Transparent">
</SolidColorBrush>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
<Image>
<Image.Style>
<Style TargetType="Image">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=ToggleSOVBtn,Path=IsChecked}" Value="True">
<Setter Property="Image.Source" Value="Images/TCU.png" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=ToggleSOVBtn,Path=IsChecked}" Value="false">
<Setter Property="Image.Source" Value="Images/TCU Inactive.png" />
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</ToggleButton>
<ToggleButton x:Name="ToggleStandingsBtn" Margin="1,0" Background="{x:Null}" BorderThickness="0" IsChecked="{Binding Path=ShowStandings}" ToolTip="Show Standings" Width="30" Height="30">
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Transparent">
</SolidColorBrush>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
<Image>
<Image.Style>
<Style TargetType="Image">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=ToggleStandingsBtn,Path=IsChecked}" Value="True">
<Setter Property="Image.Source" Value="Images/Standings.png" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=ToggleStandingsBtn,Path=IsChecked}" Value="false">
<Setter Property="Image.Source" Value="Images/Standings Inactive.png" />
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</ToggleButton>
<ToggleButton x:Name="ToggleJumpBridgesBtn" Margin="1,0" Background="{x:Null}" BorderThickness="0" IsChecked="{Binding Path=ShowJumpBridges}" ToolTip="Show Jump Bridges" Width="30" Height="30">
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Transparent">
</SolidColorBrush>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
<Image>
<Image.Style>
<Style TargetType="Image">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=ToggleJumpBridgesBtn,Path=IsChecked}" Value="True">
<Setter Property="Image.Source" Value="Images/JumpPortal.png" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=ToggleJumpBridgesBtn,Path=IsChecked}" Value="false">
<Setter Property="Image.Source" Value="Images/JumpPortal Inactive.png" />
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</ToggleButton>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="1,1" HorizontalAlignment="Center" VerticalAlignment="Center">
<ToggleButton x:Name="TogggleTimersBtn" Margin="1,0" Background="{x:Null}" BorderThickness="0" IsChecked="{Binding Path=ShowSystemTimers}" ToolTip="Show Timers" Width="30" Height="30">
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Transparent">
</SolidColorBrush>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
<Image>
<Image.Style>
<Style TargetType="Image">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=TogggleTimersBtn,Path=IsChecked}" Value="True">
<Setter Property="Image.Source" Value="Images/Timer.png" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=TogggleTimersBtn,Path=IsChecked}" Value="false">
<Setter Property="Image.Source" Value="Images/Timer Inactive.png" />
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</ToggleButton>
<ToggleButton x:Name="ToggleJumpsBtn" Margin="1,0" Background="{x:Null}" BorderThickness="0" IsChecked="{Binding Path=ShowShipJumps}" ToolTip="Jumps in the Last hour" Width="30" Height="30">
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Transparent">
</SolidColorBrush>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
<Image>
<Image.Style>
<Style TargetType="Image">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=ToggleJumpsBtn,Path=IsChecked}" Value="True">
<Setter Property="Image.Source" Value="Images/Gate.png" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=ToggleJumpsBtn,Path=IsChecked}" Value="false">
<Setter Property="Image.Source" Value="Images/Gate Inactive.png" />
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</ToggleButton>
<ToggleButton x:Name="TogglePodKillsBtn" Margin="1,0" Background="{x:Null}" BorderThickness="0" IsChecked="{Binding Path=ShowPodKills}" ToolTip="Pod kills in the Last hour" Width="30" Height="30">
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Transparent">
</SolidColorBrush>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
<Image>
<Image.Style>
<Style TargetType="Image">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=TogglePodKillsBtn,Path=IsChecked}" Value="True">
<Setter Property="Image.Source" Value="Images/Pod.png" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=TogglePodKillsBtn,Path=IsChecked}" Value="false">
<Setter Property="Image.Source" Value="Images/Pod Inactive.png" />
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</ToggleButton>
<ToggleButton x:Name="ToggleShipKillsBtn" Margin="1,0" Background="{x:Null}" BorderThickness="0" BorderBrush="{x:Null}" Foreground="{x:Null}" IsChecked="{Binding Path=ShowShipKills}" ToolTip="Ship kill in the Last hour" Width="30" Height="30">
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Transparent">
</SolidColorBrush>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
<Image>
<Image.Style>
<Style TargetType="Image">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=ToggleShipKillsBtn,Path=IsChecked}" Value="True">
<Setter Property="Image.Source" Value="Images/Ship.png" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=ToggleShipKillsBtn,Path=IsChecked}" Value="false">
<Setter Property="Image.Source" Value="Images/Ship Inactive.png" />
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</ToggleButton>
<ToggleButton x:Name="ToggleRatKillsBtn" Margin="1,0" Background="{x:Null}" BorderThickness="0" IsChecked="{Binding Path=ShowNPCKills}" ToolTip="NPC Kills in the Last hour" Width="30" Height="30">
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Transparent">
</SolidColorBrush>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
<Image>
<Image.Style>
<Style TargetType="Image">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=ToggleRatKillsBtn,Path=IsChecked}" Value="True">
<Setter Property="Image.Source" Value="Images/Rat.png" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=ToggleRatKillsBtn,Path=IsChecked}" Value="false">
<Setter Property="Image.Source" Value="Images/Rat Inactive.png" />
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</ToggleButton>
</StackPanel>
<Slider Width="170" Cursor="Arrow" Margin="0,2" Value="{Binding ESIOverlayScale}" Minimum="0.1" Maximum="2" TickFrequency="0.1" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="1" Height="18" ToolTip="Overlay/Data Scale" IsSnapToTickEnabled="True" IsMoveToPointEnabled="True" />
</StackPanel>
</Grid>
</Canvas>
</Border>
</Grid>
<Popup x:Name="SystemInfoPopup" IsOpen="False" AllowsTransparency="True" Margin="5">
<StackPanel x:Name="SystemInfoPopupSP" Background="#FF959595" Margin="2" />
</Popup>
</Grid>
</UserControl>