forked from jimmyeao/DeejNG
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
84 lines (73 loc) · 3.93 KB
/
MainWindow.xaml
File metadata and controls
84 lines (73 loc) · 3.93 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
<Window x:Class="DeejNG.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:tb="http://www.hardcodet.net/taskbar"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:local="clr-namespace:DeejNG"
mc:Ignorable="d"
Title="DeejNG"
SizeToContent="WidthAndHeight"
TextElement.Foreground="{DynamicResource MaterialDesign.Brush.Foreground}"
Background="{DynamicResource MaterialDesign.Brush.Background}"
TextElement.FontWeight="Regular"
TextElement.FontSize="12"
FontFamily="{materialDesign:MaterialDesignFont}"
TextOptions.TextFormattingMode="Ideal">
<DockPanel>
<StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Margin="10">
<TextBlock Text="COM Port:" VerticalAlignment="Center" Style="{DynamicResource MaterialDesignBody2}" />
<ComboBox x:Name="ComPortSelector" Width="100" Margin="5,0" Style="{StaticResource MaterialDesignComboBox}" DropDownOpened="ComPortSelector_DropDownOpened"/>
<Button x:Name="ConnectButton" Content="Connect" Click="Connect_Click" Style="{StaticResource MaterialDesignFlatButton}" />
<TextBlock x:Name="ConnectionStatus" Text="Disconnected" Margin="10,0,0,0" VerticalAlignment="Center" Style="{DynamicResource MaterialDesignBody2}" />
<Button Content="Toggle Theme" Click="ToggleTheme_Click" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="10" Style="{DynamicResource MaterialDesignFlatButton}"/>
</StackPanel>
<!-- Settings row -->
<StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Margin="10,0,10,5">
<CheckBox x:Name="InvertSliderCheckBox"
Content="Invert Sliders"
Checked="InvertSlider_Checked"
Unchecked="InvertSlider_Unchecked"
Margin="0,0,20,0"
VerticalAlignment="Center"
HorizontalAlignment="Left" />
<CheckBox x:Name="ShowSlidersCheckBox"
Content="Show Meters"
IsChecked="True"
Checked="ShowSlidersCheckBox_Checked"
Unchecked="ShowSlidersCheckBox_Unchecked"
VerticalAlignment="Center"
HorizontalAlignment="Left" />
<CheckBox x:Name="StartOnBootCheckBox"
Content="Start on boot"
Margin="10"
Checked="StartOnBootCheckBox_Checked"
Unchecked="StartOnBootCheckBox_Unchecked"/>
<CheckBox x:Name="StartMinimizedCheckBox"
Content="Start minimized"
Margin="10"
Checked="StartMinimizedCheckBox_Checked"
Unchecked="StartMinimizedCheckBox_Unchecked"/>
<CheckBox x:Name="DisableSmoothingCheckBox"
Content="Disable Smoothing"
Checked="DisableSmoothingCheckBox_Checked"
Unchecked="DisableSmoothingCheckBox_Unchecked" />
</StackPanel>
<!-- Main content area -->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ScrollViewer Grid.Row="0"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"
x:Name="SliderScrollViewer">
<StackPanel x:Name="SliderPanel" Orientation="Horizontal" Margin="10">
<!-- Dynamically added user controls (ChannelControl) go here -->
</StackPanel>
</ScrollViewer>
</Grid>
<tb:TaskbarIcon x:Name="MyNotifyIcon" TrayMouseDoubleClick="MyNotifyIcon_Click" ToolTipText="DeejNG" Visibility="Visible"/>
</DockPanel>
</Window>