-
Notifications
You must be signed in to change notification settings - Fork 0
/
OptionsDialogue.xaml
204 lines (186 loc) · 8.85 KB
/
OptionsDialogue.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
<Controls:Flyout
x:Class="NDI_Telestrator.OptionsDialogue"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:XAMLConverters="clr-namespace:NDI_Telestrator.XAMLConverters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:enums="clr-namespace:NDI_Telestrator.Enums"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telestrator="clr-namespace:NDI_Telestrator"
x:Name="optionsDialogue"
Width="300"
d:DesignHeight="1080"
d:DesignWidth="800"
Header="About"
IsOpen="{Binding IsOpen}"
Position="Right"
mc:Ignorable="d">
<Controls:Flyout.Resources>
<XAMLConverters:ReverseConverter x:Key="ReverseConverter" />
</Controls:Flyout.Resources>
<DockPanel>
<!--#region Buttons-->
<StackPanel Margin="10" DockPanel.Dock="Top">
<Border BorderBrush="Transparent" BorderThickness="0,0,0,3">
<Button
Name="Btn_Load"
Height="32"
HorizontalContentAlignment="Left"
materialDesign:RippleAssist.IsCentered="True"
Click="onBtnLoad"
ClipToBounds="True"
Style="{StaticResource MahApps.Styles.Button.MetroWindow.Base}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="FolderOpen" />
<TextBlock Margin="5,0,0,0" Text="Load Drawing" />
</StackPanel>
</Button>
</Border>
<Border BorderBrush="Transparent" BorderThickness="0,0,0,3">
<Button
Name="Btn_Save"
Height="32"
VerticalAlignment="Bottom"
HorizontalContentAlignment="Left"
materialDesign:RippleAssist.IsCentered="True"
Click="onBtnSave"
ClipToBounds="True"
Style="{StaticResource MahApps.Styles.Button.MetroWindow.Base}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="ContentSave" />
<TextBlock
Margin="5,0,0,0"
Style="{StaticResource MahApps.Styles.TextBlock}"
Text="Save Drawing" />
</StackPanel>
</Button>
</Border>
<Border BorderBrush="Transparent" BorderThickness="0,0,0,3">
<Button
Height="32"
VerticalAlignment="Bottom"
HorizontalContentAlignment="Left"
materialDesign:RippleAssist.IsCentered="True"
Click="onBtnAddSingle"
ClipToBounds="True"
Style="{StaticResource MahApps.Styles.Button.MetroWindow.Base}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="PlusCircleOutline" />
<TextBlock
Margin="5,0,0,0"
Style="{StaticResource MahApps.Styles.TextBlock}"
Text="Add drawing as single layer" />
</StackPanel>
</Button>
</Border>
<Border BorderBrush="Transparent" BorderThickness="0,0,0,3">
<Button
Height="32"
VerticalAlignment="Bottom"
HorizontalContentAlignment="Left"
materialDesign:RippleAssist.IsCentered="True"
Click="onBtnAddMultiple"
ClipToBounds="True"
Style="{StaticResource MahApps.Styles.Button.MetroWindow.Base}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="PlusCircleMultipleOutline" />
<TextBlock
Margin="5,0,0,0"
Style="{StaticResource MahApps.Styles.TextBlock}"
Text="Add drawing as multiple layers" />
</StackPanel>
</Button>
</Border>
</StackPanel>
<!--#endregion-->
<!--#region NDI Source-->
<StackPanel Margin="10" DockPanel.Dock="Top">
<TextBlock Style="{StaticResource MaterialDesignTitleTextBlock}" Text="NDI Source" />
<Controls:SplitButton
x:Name="NDISourcesDropdown"
Margin="0,5,0,0"
HorizontalContentAlignment="Left"
DisplayMemberPath="Name"
ItemsSource="{Binding background.Sources, ElementName=optionsDialogue}"
SelectionChanged="NDISources_Selected">
<Controls:SplitButton.Icon>
<materialDesign:PackIcon Kind="Video" />
</Controls:SplitButton.Icon>
</Controls:SplitButton>
</StackPanel>
<!--#endregion-->
<!--#region Screenshot Settings-->
<StackPanel Margin="10" DockPanel.Dock="Top">
<TextBlock Style="{StaticResource MaterialDesignTitleTextBlock}" Text="Screenshots" />
<TextBlock Text="Screenshot Format" />
<Controls:SplitButton
x:Name="ScreenshotFormatDropdown"
Margin="0,5,0,0"
HorizontalContentAlignment="Left"
DisplayMemberPath="DisplayName"
ItemsSource="{enums:EnumToItemsSource {x:Type enums:ScreenshotFormatTypes}}"
SelectedIndex="{Binding bindScreenshotFormatTypeIndex, ElementName=optionsDialogue}" />
<TextBlock Margin="0,5,0,0" Text="Quick Save" />
<StackPanel Orientation="Horizontal">
<Controls:ToggleSwitch IsOn="{Binding Source={x:Static telestrator:Options.quickSaveEnabled}, Path=.}" Toggled="onTglQuickSave" />
</StackPanel>
</StackPanel>
<!--#endregion-->
<!--#region Layers-->
<DockPanel Margin="10">
<TextBlock
DockPanel.Dock="Top"
Style="{StaticResource MaterialDesignTitleTextBlock}"
Text="Layers" />
<Border
BorderBrush="Transparent"
BorderThickness="0,0,0,3"
DockPanel.Dock="Top">
<Button
Height="32"
VerticalAlignment="Bottom"
materialDesign:RippleAssist.IsCentered="True"
Click="onBtnCreateLayer"
ClipToBounds="True"
Style="{StaticResource MaterialDesignToolForegroundButton}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="PlusBox" />
<TextBlock Margin="5,0,0,0" Text="Add new layer" />
</StackPanel>
</Button>
</Border>
<ListView
ItemsSource="{Binding whiteboard.InkLayers, Converter={StaticResource ReverseConverter}, ElementName=optionsDialogue}"
SelectedIndex="{Binding selectedIndex, ElementName=optionsDialogue}"
SelectionChanged="ListBox_SelectionChanged"
SelectionMode="Single">
<ListView.View>
<GridView>
<GridView.ColumnHeaderContainerStyle>
<Style TargetType="{x:Type GridViewColumnHeader}">
<Setter Property="Visibility" Value="Collapsed" />
</Style>
</GridView.ColumnHeaderContainerStyle>
<GridViewColumn Width="200">
<GridViewColumn.CellTemplate>
<DataTemplate>
<Image Margin="0,5,0,5" Source="{Binding Bitmap}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="20">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Strokes.Count}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
</DockPanel>
<!--#endregion-->
</DockPanel>
</Controls:Flyout>