-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
335 lines (302 loc) · 22 KB
/
Copy pathMainWindow.xaml
File metadata and controls
335 lines (302 loc) · 22 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
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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<Window x:Class="SpigenAudioCTRL.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"
mc:Ignorable="d"
Title="Spigen Audio CTRL"
Height="680" Width="1020"
MinHeight="580" MinWidth="880"
WindowStartupLocation="CenterScreen"
Background="#0A0A0A"
Foreground="#FFFFFF"
FontFamily="Segoe UI Variable Display, Segoe UI Variable Text, Segoe UI, sans-serif">
<WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="40"
ResizeBorderThickness="6"
CornerRadius="0"
GlassFrameThickness="0"
UseAeroCaptionButtons="False" />
</WindowChrome.WindowChrome>
<Grid Background="#0A0A0A">
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- TOP BAR: Refined Scandinavian TitleBar -->
<Grid Grid.Row="0" Background="#0E0E0E">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- Left: App Identity & Live Status Pill -->
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="16,0,0,0">
<TextBlock Text="Spigen Audio CTRL" Foreground="#FFFFFF" FontWeight="SemiBold" FontSize="12.5" VerticalAlignment="Center" Margin="0,0,12,0"/>
<Border Background="#141414" BorderBrush="#1AFFFFFF" BorderThickness="1" CornerRadius="10" Padding="8,2" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<Ellipse x:Name="tbStatusDot" Width="6" Height="6" Fill="#E63946" Margin="0,0,6,0"/>
<TextBlock x:Name="tbStatusText" Text="Connecting..." Foreground="#999999" FontSize="11"/>
</StackPanel>
</Border>
</StackPanel>
<!-- Right: Caption Buttons -->
<StackPanel Grid.Column="1" Orientation="Horizontal" WindowChrome.IsHitTestVisibleInChrome="True">
<Button x:Name="btnMinimize" Style="{StaticResource CaptionButtonStyle}" Click="BtnMinimize_Click" Width="46" Height="40" ToolTip="Minimize">
<Path Data="M1,6 L11,6" Stroke="#999999" StrokeThickness="1" Width="10" Height="10" Stretch="Uniform"/>
</Button>
<Button x:Name="btnMaximize" Style="{StaticResource CaptionButtonStyle}" Click="BtnMaximize_Click" Width="46" Height="40" ToolTip="Maximize">
<Path x:Name="maximizeIcon" Data="M1.5,1.5 H10.5 V10.5 H1.5 Z" Stroke="#999999" StrokeThickness="1" Width="10" Height="10" Stretch="Uniform"/>
</Button>
<Button x:Name="btnClose" Style="{StaticResource CloseCaptionButtonStyle}" Click="BtnClose_Click" Width="46" Height="40" ToolTip="Close">
<Path Data="M2,2 L10,10 M10,2 L2,10" Stroke="#999999" StrokeThickness="1" Width="10" Height="10" Stretch="Uniform"/>
</Button>
</StackPanel>
</Grid>
<!-- MAIN APP BODY: 2-Column Scandinavian Layout -->
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="220" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- LEFT SIDEBAR NAVIGATION RAIL -->
<Border Grid.Column="0" Background="#0E0E0E" BorderBrush="#14FFFFFF" BorderThickness="0,0,1,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- Device Info Card -->
<Border Grid.Row="0" Margin="12,14,12,10" Background="#141414" BorderBrush="#1AFFFFFF" BorderThickness="1" CornerRadius="6" Padding="12,10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border Width="28" Height="28" CornerRadius="4" Background="#1A1A1A" Margin="0,0,10,0">
<Path Data="M3,18 V12 A9,9 0 0,1 21,12 V18 A2,2 0 0,1 19,20 H18 A2,2 0 0,1 16,18 V15 A2,2 0 0,1 18,13 H21 V12 A9,9 0 0,0 3,12 V13 H6 A2,2 0 0,1 8,15 V18 A2,2 0 0,1 6,20 H5 A2,2 0 0,1 3,18 Z"
Stroke="#FFFFFF" StrokeThickness="1.2" Width="14" Height="14" Stretch="Uniform" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<StackPanel Grid.Column="1" VerticalAlignment="Center">
<TextBlock Text="Spigen SA-HP P10" Foreground="#FFFFFF" FontWeight="SemiBold" FontSize="12"/>
<TextBlock x:Name="txtDeviceSubtitle" Text="Bluetooth" Foreground="#777777" FontSize="10.5" Margin="0,1,0,0"/>
<!-- Fix #5 (audit): Battery level display - hidden until a level is received -->
<TextBlock x:Name="txtBatteryLevel" Text="" Foreground="#52B788" FontSize="10" FontWeight="SemiBold" Margin="0,2,0,0" Visibility="Collapsed"/>
</StackPanel>
</Grid>
</Border>
<!-- Navigation Rail Menu Items -->
<StackPanel Grid.Row="1" Margin="6,6,6,0">
<!-- Noise Control: Sound Waveform -->
<RadioButton x:Name="navAnc" Style="{StaticResource NavRailItemStyle}" IsChecked="True" Checked="Nav_Checked">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<Path Data="M2,12 L5,5 L9,19 L13,3 L17,21 L21,8 L23,12" Stroke="#CCCCCC" StrokeThickness="1.3" Width="14" Height="14" Stretch="Uniform" Margin="0,0,10,0"/>
<TextBlock Text="Noise Control" VerticalAlignment="Center"/>
</StackPanel>
</RadioButton>
<!-- 10-Band Equalizer: Mixing Console Faders -->
<RadioButton x:Name="navEq" Style="{StaticResource NavRailItemStyle}" Checked="Nav_Checked">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<Path Data="M4,21 V14 M4,10 V3 M12,21 V12 M12,8 V3 M20,21 V16 M20,12 V3 M1,14 H7 M9,8 H15 M17,16 H23" Stroke="#CCCCCC" StrokeThickness="1.3" Width="14" Height="14" Stretch="Uniform" Margin="0,0,10,0"/>
<TextBlock Text="10-Band Equalizer" VerticalAlignment="Center"/>
</StackPanel>
</RadioButton>
<!-- Button Remapping: 3-Button Controller -->
<RadioButton x:Name="navButtons" Style="{StaticResource NavRailItemStyle}" Checked="Nav_Checked">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<Path Data="M5,6 H19 A3,3 0 0,1 22,9 V15 A3,3 0 0,1 19,18 H5 A3,3 0 0,1 2,15 V9 A3,3 0 0,1 5,6 Z M7.5,12 A1.5,1.5 0 1,1 7.5,11.99 Z M12,12 A1.5,1.5 0 1,1 12,11.99 Z M16.5,12 A1.5,1.5 0 1,1 16.5,11.99 Z" Stroke="#CCCCCC" StrokeThickness="1.2" Width="15" Height="15" Stretch="Uniform" Margin="0,0,10,0"/>
<TextBlock Text="Button Remapping" VerticalAlignment="Center"/>
</StackPanel>
</RadioButton>
</StackPanel>
<!-- Bottom Disconnect / Connect Button -->
<Border Grid.Row="2" Padding="12,14" BorderBrush="#14FFFFFF" BorderThickness="0,1,0,0">
<Button x:Name="btnConnectAction" Style="{StaticResource NordicOutlineButtonStyle}" Click="BtnConnectAction_Click" HorizontalAlignment="Stretch" Height="34">
<StackPanel Orientation="Horizontal">
<Path Data="M18.36,6.64 A9,9 0 1,1 5.64,6.64 M12,2 V12" Stroke="#888888" StrokeThickness="1.3" Width="11" Height="11" Stretch="Uniform" Margin="0,0,8,0" VerticalAlignment="Center"/>
<TextBlock x:Name="txtConnectAction" Text="Disconnect" VerticalAlignment="Center"/>
</StackPanel>
</Button>
</Border>
</Grid>
</Border>
<!-- RIGHT MAIN CONTENT VIEWPORT -->
<Grid Grid.Column="1" Background="#0A0A0A" Margin="28,22,28,24">
<!-- ==================== TAB 1: NOISE CONTROL ==================== -->
<Grid x:Name="panelAnc" Visibility="Visible">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- Section Header -->
<StackPanel Grid.Row="0" Margin="0,0,0,20">
<TextBlock Text="Noise Control" FontSize="18" FontWeight="SemiBold" Foreground="#FFFFFF"/>
<TextBlock Text="Select active acoustic isolation or ambient transparency profile" FontSize="12.5" Foreground="#888888" Margin="0,3,0,0"/>
</StackPanel>
<!-- 2x3 Grid of ANC Mode Tiles -->
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- Deep ANC -->
<RadioButton Grid.Row="0" Grid.Column="0" x:Name="ancDeep" Style="{StaticResource NordicAncTileStyle}" Checked="AncMode_Checked">
<StackPanel>
<Grid Margin="0,0,0,6">
<TextBlock Text="Deep ANC" FontWeight="SemiBold" FontSize="13" Foreground="#FFFFFF"/>
<Border HorizontalAlignment="Right" Background="#1C1C1C" CornerRadius="4" Padding="6,2">
<TextBlock Text="-43 dB" FontSize="10" FontWeight="SemiBold" Foreground="#CCCCCC"/>
</Border>
</Grid>
<TextBlock Text="Maximum isolation for flights, transit, and loud environments." Foreground="#777777" FontSize="11" TextWrapping="Wrap"/>
</StackPanel>
</RadioButton>
<!-- Adaptive ANC -->
<RadioButton Grid.Row="0" Grid.Column="1" x:Name="ancAdaptive" Style="{StaticResource NordicAncTileStyle}" IsChecked="True" Checked="AncMode_Checked">
<StackPanel>
<Grid Margin="0,0,0,6">
<TextBlock Text="Adaptive ANC" FontWeight="SemiBold" FontSize="13" Foreground="#FFFFFF"/>
<Border HorizontalAlignment="Right" Background="#1C1C1C" CornerRadius="4" Padding="6,2">
<TextBlock Text="Dynamic" FontSize="10" FontWeight="SemiBold" Foreground="#CCCCCC"/>
</Border>
</Grid>
<TextBlock Text="Dynamically recalculates filter strength based on real-time ear seal." Foreground="#777777" FontSize="11" TextWrapping="Wrap"/>
</StackPanel>
</RadioButton>
<!-- Commuting -->
<RadioButton Grid.Row="0" Grid.Column="2" x:Name="ancCommuting" Style="{StaticResource NordicAncTileStyle}" Checked="AncMode_Checked">
<StackPanel>
<Grid Margin="0,0,0,6">
<TextBlock Text="Commuting" FontWeight="SemiBold" FontSize="13" Foreground="#FFFFFF"/>
<Border HorizontalAlignment="Right" Background="#1C1C1C" CornerRadius="4" Padding="6,2">
<TextBlock Text="Transit" FontSize="10" FontWeight="SemiBold" Foreground="#888888"/>
</Border>
</Grid>
<TextBlock Text="Targets low-frequency vehicle rumble on trains and buses." Foreground="#777777" FontSize="11" TextWrapping="Wrap"/>
</StackPanel>
</RadioButton>
<!-- Anti-Wind -->
<RadioButton Grid.Row="1" Grid.Column="0" x:Name="ancAntiWind" Style="{StaticResource NordicAncTileStyle}" Checked="AncMode_Checked">
<StackPanel>
<Grid Margin="0,0,0,6">
<TextBlock Text="Anti-Wind" FontWeight="SemiBold" FontSize="13" Foreground="#FFFFFF"/>
<Border HorizontalAlignment="Right" Background="#1C1C1C" CornerRadius="4" Padding="6,2">
<TextBlock Text="Outdoor" FontSize="10" FontWeight="SemiBold" Foreground="#888888"/>
</Border>
</Grid>
<TextBlock Text="Suppresses turbulence across external feed-forward microphones." Foreground="#777777" FontSize="11" TextWrapping="Wrap"/>
</StackPanel>
</RadioButton>
<!-- Transparency -->
<RadioButton Grid.Row="1" Grid.Column="1" x:Name="ancTransparency" Style="{StaticResource NordicAncTileStyle}" Checked="AncMode_Checked">
<StackPanel>
<Grid Margin="0,0,0,6">
<TextBlock Text="Transparency" FontWeight="SemiBold" FontSize="13" Foreground="#FFFFFF"/>
<Border HorizontalAlignment="Right" Background="#1C1C1C" CornerRadius="4" Padding="6,2">
<TextBlock Text="Ambient" FontSize="10" FontWeight="SemiBold" Foreground="#CCCCCC"/>
</Border>
</Grid>
<TextBlock Text="Natural environmental awareness and conversation pass-through." Foreground="#777777" FontSize="11" TextWrapping="Wrap"/>
</StackPanel>
</RadioButton>
<!-- Off (Passive) -->
<RadioButton Grid.Row="1" Grid.Column="2" x:Name="ancOff" Style="{StaticResource NordicAncTileStyle}" Checked="AncMode_Checked">
<StackPanel>
<Grid Margin="0,0,0,6">
<TextBlock Text="Off (Passive)" FontWeight="SemiBold" FontSize="13" Foreground="#FFFFFF"/>
<Border HorizontalAlignment="Right" Background="#1C1C1C" CornerRadius="4" Padding="6,2">
<TextBlock Text="Passive" FontSize="10" FontWeight="SemiBold" Foreground="#888888"/>
</Border>
</Grid>
<TextBlock Text="Disables ANC microphones for maximum battery life (~60 hours)." Foreground="#777777" FontSize="11" TextWrapping="Wrap"/>
</StackPanel>
</RadioButton>
</Grid>
<!-- Low Latency Switch Row -->
<Border Grid.Row="2" Margin="4,16,4,0" Background="#141414" BorderBrush="#1AFFFFFF" BorderThickness="1" CornerRadius="6" Padding="16,14">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" VerticalAlignment="Center">
<TextBlock Text="Low-Latency Gaming Mode" FontSize="13" FontWeight="SemiBold" Foreground="#FFFFFF"/>
<TextBlock Text="Reduces wireless audio transmission delay to ~45ms" FontSize="11.5" Foreground="#777777" Margin="0,2,0,0"/>
</StackPanel>
<CheckBox Grid.Column="1" x:Name="chkGamingMode" Style="{StaticResource NordicToggleSwitchStyle}" Click="ChkGamingMode_Click"/>
</Grid>
</Border>
</Grid>
<!-- ==================== TAB 2: 10-BAND EQUALIZER ==================== -->
<Grid x:Name="panelEq" Visibility="Collapsed">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="165" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- Header & Preset Controls -->
<Grid Grid.Row="0" Margin="0,0,0,16">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" VerticalAlignment="Center">
<TextBlock Text="10-Band DSP Equalizer" FontSize="18" FontWeight="SemiBold" Foreground="#FFFFFF"/>
<TextBlock Text="Fine-tune 16-bit parametric hardware filters stored on-chip" FontSize="12.5" Foreground="#888888" Margin="0,3,0,0"/>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center">
<ComboBox x:Name="cmbEqPresets" Style="{StaticResource NordicComboBoxStyle}" Width="190" Margin="0,0,8,0" SelectionChanged="CmbEqPresets_SelectionChanged"/>
<Button x:Name="btnSavePreset" Style="{StaticResource NordicButtonStyle}" Content="Save" Margin="0,0,6,0" Click="BtnSavePreset_Click"/>
<Button x:Name="btnResetEq" Style="{StaticResource NordicButtonStyle}" Content="Reset" Click="BtnResetEq_Click"/>
</StackPanel>
</Grid>
<!-- Dynamic Bezier Curve Canvas -->
<Border Grid.Row="1" Background="#0E0E0E" BorderBrush="#1AFFFFFF" BorderThickness="1" CornerRadius="6" ClipToBounds="True">
<Canvas x:Name="eqCanvas" SizeChanged="EqCanvas_SizeChanged" MouseDown="EqCanvas_MouseDown" MouseMove="EqCanvas_MouseMove" MouseUp="EqCanvas_MouseUp"/>
</Border>
<!-- 10 Vertical Sliders Rack -->
<Border Grid.Row="2" Margin="0,10,0,0" Background="#141414" BorderBrush="#1AFFFFFF" BorderThickness="1" CornerRadius="6" Padding="6,12">
<UniformGrid x:Name="eqSlidersGrid" Columns="10" Height="165"/>
</Border>
<!-- Harman Target Reference Toggle -->
<Grid Grid.Row="3" Margin="0,12,0,0">
<CheckBox x:Name="chkHarmanTarget" Content="Show Harman Target 2019 reference curve" IsChecked="True" Foreground="#888888" FontSize="12" Click="ChkHarmanTarget_Click">
<CheckBox.Template>
<ControlTemplate TargetType="CheckBox">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Cursor="Hand">
<Ellipse Width="8" Height="8" Fill="#E5A93C" Margin="0,0,8,0"/>
<ContentPresenter VerticalAlignment="Center"/>
</StackPanel>
</ControlTemplate>
</CheckBox.Template>
</CheckBox>
</Grid>
</Grid>
<!-- ==================== TAB 3: BUTTON REMAPPING ==================== -->
<Grid x:Name="panelButtons" Visibility="Collapsed">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Margin="0,0,0,16">
<TextBlock Text="Button Remapping" FontSize="18" FontWeight="SemiBold" Foreground="#FFFFFF"/>
<TextBlock Text="Customize gestures and physical key actions stored in headphone memory" FontSize="12.5" Foreground="#888888" Margin="0,3,0,0"/>
</StackPanel>
<!-- Grouped Settings Table -->
<Border Grid.Row="1" Background="#141414" BorderBrush="#1AFFFFFF" BorderThickness="1" CornerRadius="6" Padding="14,6">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel x:Name="buttonRemapList"/>
</ScrollViewer>
</Border>
</Grid>
</Grid>
</Grid>
</Grid>
</Window>