-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
MainWindow.xaml
101 lines (101 loc) · 7.51 KB
/
MainWindow.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
<Window x:Class="VRC_OSC_ExternallyTrackedObject.MainWindow"
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"
xmlns:local="clr-namespace:VRC_OSC_ExternallyTrackedObject"
mc:Ignorable="d"
x:Name="MainWindowName" PreviewKeyDown="MainWindowName_KeyDown"
Title="VRC Tracked Objects" Width="450" ResizeMode="CanMinimize" SizeToContent="Height" WindowStartupLocation="CenterScreen">
<DockPanel>
<Menu DockPanel.Dock="Top">
<MenuItem Header="_File">
<MenuItem Header="_Open config file" Click="Btn_openConfig"></MenuItem>
<MenuItem Header="_Save config file" Click="Btn_saveConfig"></MenuItem>
</MenuItem>
</Menu>
<DockPanel>
<GroupBox Header="Global Settings" DockPanel.Dock="Top">
<StackPanel>
<Border BorderThickness="5,5,5,5">
<CheckBox Content="Start tracking when launched from config file" ToolTip="Automatically start tracking when this config file is loaded as a launch parameter" x:Name="AutostartCheckbox"></CheckBox>
</Border>
<local:LabeledInput LabelText="OSC Input Address" x:Name="OSCInputAddress"></local:LabeledInput>
<local:LabeledInput LabelText="OSC Output Address" x:Name="OSCOutputAddress"></local:LabeledInput>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40"></ColumnDefinition>
<ColumnDefinition Width="110"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<Button Grid.RowSpan="2" FontSize="9" VerticalAlignment="Center" Height="30" Click="DevicesRefresh_Click">Refresh</Button>
<Label Grid.Column="1" Height="28" Content="Controller" HorizontalAlignment="Left"></Label>
<ComboBox Grid.Column="2" Height="20" x:Name="ControllerDropdown" SelectionChanged="ControllerDropdown_SelectionChanged" DisplayMemberPath="DisplayName" SelectedValuePath="Serial" />
<Label Grid.Row="1" Grid.Column="1" Height="28" Content="Tracked Device" HorizontalAlignment="Left"></Label>
<ComboBox Grid.Row="1" Grid.Column="2" Height="20" x:Name="TrackerDropdown" SelectionChanged="TrackerDropdown_SelectionChanged" DisplayMemberPath="DisplayName" SelectedValuePath="Serial" />
</Grid>
</StackPanel>
</GroupBox>
<ComboBox DockPanel.Dock="Top" Margin="5,5,5,5" DisplayMemberPath="DisplayName" SelectedValuePath="Id" x:Name="AvatarDropdown" SelectionChanged="AvatarDropdown_SelectionChanged" />
<TabControl>
<TabItem Header="Tracking" x:Name="TrackingTab">
<StackPanel>
<GroupBox Header="Parameters">
<StackPanel>
<local:LabeledInput LabelText="Activate (bool) [optional]" x:Name="ParamTrigger"></local:LabeledInput>
<local:LabeledInput LabelText="Position X (float)" x:Name="ParamPosX"></local:LabeledInput>
<local:LabeledInput LabelText="Position Y (float)" x:Name="ParamPosY"></local:LabeledInput>
<local:LabeledInput LabelText="Position Z (float)" x:Name="ParamPosZ"></local:LabeledInput>
<local:LabeledInput LabelText="Rotation X (float)" x:Name="ParamRotX"></local:LabeledInput>
<local:LabeledInput LabelText="Rotation Y (float)" x:Name="ParamRotY"></local:LabeledInput>
<local:LabeledInput LabelText="Rotation Z (float)" x:Name="ParamRotZ"></local:LabeledInput>
</StackPanel>
</GroupBox>
<Grid Height="30">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Label Height="28" Content="Current status" HorizontalAlignment="Left"></Label>
<Label Grid.Column="1" Height="28" Content="inactive" HorizontalAlignment="Left" x:Name="CurrentStatusLabel"></Label>
</Grid>
<Button Margin="5,5,5,5" Height="25" x:Name="StartTrackingButton" Click="StartTrackingButton_Click">Start Tracking</Button>
</StackPanel>
</TabItem>
<TabItem Header="Calibration" x:Name="CalibrationTab">
<StackPanel>
<GroupBox Header="Calibration Values">
<StackPanel>
<local:LabeledInput LabelText="Scale" x:Name="CalibrationScale"/>
<local:LabeledInput LabelText="Translation X" x:Name="CalibrationPosX"></local:LabeledInput>
<local:LabeledInput LabelText="Translation Y" x:Name="CalibrationPosY"></local:LabeledInput>
<local:LabeledInput LabelText="Translation Z" x:Name="CalibrationPosZ"></local:LabeledInput>
<local:LabeledInput LabelText="Rotation X" x:Name="CalibrationRotX"></local:LabeledInput>
<local:LabeledInput LabelText="Rotation Y" x:Name="CalibrationRotY"></local:LabeledInput>
<local:LabeledInput LabelText="Rotation Z" x:Name="CalibrationRotZ"></local:LabeledInput>
</StackPanel>
</GroupBox>
<Button Margin="5,5,5,5" Height="25" x:Name="StartCalibrationButton" Click="StartCalibrationButton_Click">Start Calibration</Button>
</StackPanel>
</TabItem>
<TabItem Header="Avatars" x:Name="AvatarsTab">
<StackPanel>
<ListBox Margin="5,5,5,5" Height="100" DisplayMemberPath="DisplayName" SelectedValuePath="Id" x:Name="AvatarListBox"/>
<Button Margin="5,0,5,5" Height="20" Click="Btn_deleteAvatar">Delete</Button>
<GroupBox Header="Add avatar">
<StackPanel>
<local:LabeledInput LabelText="Avatar ID" x:Name="NewAvatarId"></local:LabeledInput>
<local:LabeledInput LabelText="Avatar Name" x:Name="NewAvatarName"></local:LabeledInput>
<Button Margin="5,5,5,5" Height="20" Click="Btn_addAvatar">Add</Button>
</StackPanel>
</GroupBox>
</StackPanel>
</TabItem>
</TabControl>
</DockPanel>
</DockPanel>
</Window>