forked from Slazanger/SMT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Universe3dControl.xaml
110 lines (88 loc) · 5.55 KB
/
Universe3dControl.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
<UserControl x:Class="SMT.Universe3DControl"
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"
xmlns:ht="clr-namespace:HelixToolkit.Wpf;assembly=HelixToolkit.Wpf"
xmlns:hx="http://helix-toolkit.org/wpf/SharpDX"
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" />
<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>
<hx:Viewport3DX x:Name="UniverseMain3DViewPort" Grid.Row="1" Background="DarkGray" Camera="{Binding Camera}" EffectsManager="{Binding EffectsManager}">
<hx:Viewport3DX.InputBindings>
<KeyBinding Key="B" Command="hx:ViewportCommands.BackView" />
<KeyBinding Key="F" Command="hx:ViewportCommands.FrontView" />
<KeyBinding Key="U" Command="hx:ViewportCommands.TopView" />
<KeyBinding Key="D" Command="hx:ViewportCommands.BottomView" />
<KeyBinding Key="L" Command="hx:ViewportCommands.LeftView" />
<KeyBinding Key="R" Command="hx:ViewportCommands.RightView" />
<KeyBinding Command="hx:ViewportCommands.ZoomExtents" Gesture="Control+E" />
<MouseBinding Command="hx:ViewportCommands.Rotate" Gesture="RightClick" />
<MouseBinding Command="hx:ViewportCommands.Zoom" Gesture="MiddleClick" />
<MouseBinding Command="hx:ViewportCommands.Pan" Gesture="Shift+RightClick" />
</hx:Viewport3DX.InputBindings>
<hx:AmbientLight3D Color="#515151" />
<hx:DirectionalLight3D Direction="-1, -1, 0" Color="Green" />
</hx:Viewport3DX>
</Grid>
</UserControl>