forked from Slazanger/SMT
-
Notifications
You must be signed in to change notification settings - Fork 1
/
UniverseControl.xaml
219 lines (189 loc) · 13.5 KB
/
UniverseControl.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
<UserControl x:Class="SMT.UniverseControl"
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:local="clr-namespace:SMT"
mc:Ignorable="d"
xmlns:zoombox1="clr-namespace:WpfHelpers.WpfControls.Zoombox;assembly=WpfHelpers"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:dotNetKitControls="clr-namespace:DotNetKit.Windows.Controls;assembly=DotNetKit.Wpf.AutoCompleteComboBox"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<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" />
<Separator />
<MenuItem Header="Show Jump Range">
<MenuItem Header="Remove All" DataContext="-1" Click="SetJumpRange_Click" />
<MenuItem Header="None" DataContext="0" Click="SetJumpRange_Click" />
<MenuItem Header="Ansiblex (5.0LY)" DataContext="5" 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>
<MenuItem Header="SOV">
<MenuItem Header="TCU" />
<MenuItem Header="IHub" />
</MenuItem>
<MenuItem Header="Info" />
<MenuItem Header="DotLan" Click="SysContexMenuItemDotlan_Click" />
<MenuItem Header="ZKillBoard" Click="SysContexMenuItemZKB_Click" />
<MenuItem Header="Show In Regions" Click="SysContexMenuShowInRegion_Click" />
</ContextMenu>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Margin="4,2,1,2" Orientation="Horizontal" HorizontalAlignment="Left">
<Label Content="Search :" />
<dotNetKitControls:AutoCompleteComboBox x:Name="GlobalSystemDropDownAC" Width="200" FontSize="12" Margin="5,0" SelectionChanged="GlobalSystemDropDownAC_SelectionChanged" TextSearch.TextPath="Name">
<dotNetKitControls:AutoCompleteComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</dotNetKitControls:AutoCompleteComboBox.ItemsPanel>
</dotNetKitControls:AutoCompleteComboBox>
<Button x:Name="RecentreBtn" Click="RecentreBtn_Click" Padding="0">
<Image Source="Images/recentre.png" />
</Button>
<CheckBox x:Name="FollowCharacterChk" Margin="5,-1,5,0" Content="Auto Follow Active Character" HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="False" Checked="FollowCharacterChk_Checked" />
</StackPanel>
<zoombox1:ZoomControl x:Name="MainZoomControl" MinZoom="0.5" MaxZoom="10" Margin="0" ZoomChanged="MainZoomControl_ZoomChanged" Grid.Row="1" Zoom="1.2" ContentDragFinished="MainZoomControl_ContentDragFinished">
<Canvas x:Name="UniverseMainCanvas" Margin="5" Width="5000" Height="5000" UseLayoutRounding="True" ScrollViewer.VerticalScrollBarVisibility="Disabled" MouseDown="UniverseMainCanvas_MouseDown" />
</zoombox1:ZoomControl>
<Border BorderThickness="2" BorderBrush="Black" Background="#FF232223" Width="145" Height="70" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,20,20" CornerRadius="4" Panel.ZIndex="111" Grid.Row="1">
<Canvas x:Name="ToolBoxCanvas">
<Grid Canvas.Left="0" Canvas.Top="2">
<StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,0,0,0">
<StackPanel Orientation="Horizontal" Margin="1,1" HorizontalAlignment="Center" VerticalAlignment="Center">
<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="140" Cursor="Arrow" Margin="0,2" Value="{Binding ESIOverlayScale}" Minimum="0.2" Maximum="2" TickFrequency="0.2" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="1" Foreground="{x:Null}" BorderBrush="{x:Null}" Background="{x:Null}" Height="18" ToolTip="Overlay/Data Scale" SmallChange="0.2" IsSnapToTickEnabled="True" IsMoveToPointEnabled="True" />
</StackPanel>
</Grid>
</Canvas>
</Border>
</Grid>
</UserControl>