-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathUserOptionsWindow.xaml
More file actions
826 lines (764 loc) · 55.9 KB
/
Copy pathUserOptionsWindow.xaml
File metadata and controls
826 lines (764 loc) · 55.9 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
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
<Window x:Class="UltimateKtv.UserOptionsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
Title="使用者設定選項"
Height="900"
Width="1024"
WindowStartupLocation="CenterOwner"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
ResizeMode="NoResize"
UseLayoutRounding="True"
SnapsToDevicePixels="True">
<Window.Resources>
<ResourceDictionary>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
<sys:Double x:Key="OptionsHeaderFontSize">32</sys:Double>
<sys:Double x:Key="OptionsItemLabelFontSize">28</sys:Double>
<sys:Double x:Key="OptionsItemButtonFontSize">26</sys:Double>
<sys:Double x:Key="OptionsFooterButtonFontSize">28</sys:Double>
<sys:Double x:Key="OptionsDescriptionFontSize">20</sys:Double>
<sys:Double x:Key="OptionsSmallFontSize">16</sys:Double>
<!-- Custom Slider style with theme colors -->
<Style TargetType="Slider" BasedOn="{StaticResource {x:Type Slider}}">
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidBrush}" />
</Style>
<!-- Custom ToggleButton style for switch buttons with theme colors -->
<Style x:Key="ThemedSwitchToggleButton" TargetType="ToggleButton" BasedOn="{StaticResource MaterialDesignSwitchToggleButton}">
<Setter Property="Background" Value="{DynamicResource PrimaryHueMidBrush}" />
</Style>
</ResourceDictionary>
</Window.Resources>
<Viewbox Stretch="Fill" StretchDirection="Both">
<Border Background="{DynamicResource MaterialDesignPaper}"
BorderBrush="{DynamicResource PrimaryBrush}"
BorderThickness="2"
CornerRadius="10"
Width="1024" Height="900"
Effect="{DynamicResource MaterialDesignShadowDepth5}">
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Header -->
<Grid Grid.Row="0" Margin="0,0,0,20">
<Button Name="ExitProgramButton" Click="ExitProgramButton_Click"
Style="{StaticResource MaterialDesignRaisedButton}"
Background="#F44336" Foreground="White" BorderThickness="0"
Height="45" FontSize="26" FontWeight="Bold"
HorizontalAlignment="Right" VerticalAlignment="Center">
<Button.Content>
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="ExitToApp" Width="26" Height="26" VerticalAlignment="Center" Margin="5,0,5,0"/>
<TextBlock Text="退出程式" VerticalAlignment="Center"/>
</StackPanel>
</Button.Content>
</Button>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
<materialDesign:PackIcon Kind="Settings" Width="32" Height="32"
Foreground="{DynamicResource PrimaryBrush}"
VerticalAlignment="Center" Margin="0,0,10,0"/>
<TextBlock Text="使用者設定選項 (Settings)" FontSize="{StaticResource OptionsHeaderFontSize}" FontWeight="Bold"
VerticalAlignment="Center"
Foreground="{DynamicResource MaterialDesignBody}"/>
</StackPanel>
</Grid>
<!-- Scrollable Options - same content as window version -->
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
<StackPanel Margin="5">
<!-- Row 1: Public IP + Remote Server -->
<Grid Margin="0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Public IP QR Code (Left) -->
<Border Grid.Column="0" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Text="公網IP連線" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock Text="埠號:" FontSize="{StaticResource OptionsItemLabelFontSize}" VerticalAlignment="Center" Margin="0,0,10,0"
Foreground="{DynamicResource MaterialDesignBody}"/>
<TextBox x:Name="PublicServerPortTextBox"
Style="{x:Null}"
Width="100" Height="40"
FontSize="{StaticResource OptionsItemLabelFontSize}"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
TextAlignment="Center"
Padding="5"
BorderBrush="{DynamicResource MaterialDesignDivider}"
BorderThickness="1"
Background="{DynamicResource MaterialDesignTextFieldBoxBackground}"
Foreground="{DynamicResource MaterialDesignBody}"
PreviewTextInput="PublicServerPortTextBox_PreviewTextInput"
TextChanged="PublicServerPortTextBox_TextChanged"/>
</StackPanel>
<TextBlock Name="PublicIpStatusText" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
Text="" FontSize="{StaticResource OptionsDescriptionFontSize}" Opacity="0.7" Margin="0,4,0,0"
VerticalAlignment="Top" TextWrapping="Wrap" Foreground="{DynamicResource MaterialDesignBody}"/>
<Image Name="PublicQrCodeImage" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"
Width="200" Height="200" Margin="0,10,0,0"
Visibility="Collapsed" HorizontalAlignment="Center"/>
</Grid>
</Border>
<!-- Local HTTP Server QR Code (Right) -->
<Border Grid.Column="2" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Name="HttpServerLabel" Grid.Row="0" Grid.Column="0" Text="遠端點歌伺服器" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<ToggleButton Name="HttpServerToggle" Grid.Row="0" Grid.Column="1"
Style="{StaticResource ThemedSwitchToggleButton}"
VerticalAlignment="Center"
Checked="HttpServerToggle_StateChanged"
Unchecked="HttpServerToggle_StateChanged"/>
<TextBlock Name="HttpStatusText" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
Text="伺服器未啟用" FontSize="{StaticResource OptionsDescriptionFontSize}" Opacity="0.7" Margin="0,4,0,0"
VerticalAlignment="Top" TextWrapping="Wrap" Foreground="{DynamicResource MaterialDesignBody}"/>
<Image Name="QrCodeImage" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"
Width="200" Height="200" Margin="0,10,0,0"
Visibility="Collapsed" HorizontalAlignment="Center"/>
</Grid>
</Border>
</Grid>
<!-- Row 2: Change Song Library Drive + Random Play -->
<Grid Margin="0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Change Song Library Drive (Left) -->
<Border Grid.Column="0" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Text="更換歌庫磁碟代號" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<ToggleButton Name="ChangeSongLibraryDriveToggle" Grid.Row="0" Grid.Column="1"
Style="{StaticResource ThemedSwitchToggleButton}"
VerticalAlignment="Center"
Checked="ChangeSongLibraryDriveToggle_Checked"
Unchecked="ChangeSongLibraryDriveToggle_Unchecked"/>
<StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal" Margin="0,8,0,0"
Visibility="{Binding ElementName=ChangeSongLibraryDriveToggle, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}"
Name="SongLibraryDrivePathPanel">
<TextBlock Text="路徑:" FontSize="{StaticResource OptionsDescriptionFontSize}" VerticalAlignment="Center" Margin="0,0,10,0"
Foreground="{DynamicResource MaterialDesignBody}"/>
<TextBlock x:Name="SongLibraryDrivePathText"
Text="(尚未選擇目錄)"
Width="280"
FontSize="{StaticResource OptionsDescriptionFontSize}"
VerticalAlignment="Center"
TextTrimming="CharacterEllipsis"
ToolTip="{Binding Text, RelativeSource={RelativeSource Self}}"
Foreground="{DynamicResource MaterialDesignBody}"/>
<Button x:Name="BrowseSongLibraryDriveButton"
Content="瀏覽..."
Style="{DynamicResource MaterialDesignOutlinedButton}"
FontSize="{StaticResource OptionsSmallFontSize}"
Height="35"
Margin="10,0,0,0"
Click="BrowseSongLibraryDrive_Click"/>
</StackPanel>
</Grid>
</Border>
<!-- Random Play (Right) -->
<Border Grid.Column="2" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Text="隨機播放" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<ToggleButton Name="RandomPlayToggle" Grid.Row="0" Grid.Column="1"
Style="{StaticResource ThemedSwitchToggleButton}"
VerticalAlignment="Center"
Checked="RandomPlayToggle_Checked"
Unchecked="RandomPlayToggle_Unchecked"/>
<StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal" Margin="0,8,0,0"
Name="RandomPlayOptionsPanel">
<ComboBox x:Name="RandomPlayCategoryComboBox"
Width="200" Height="35"
FontSize="{StaticResource OptionsDescriptionFontSize}"
Foreground="{DynamicResource MaterialDesignBody}"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Margin="0,0,10,0"
SelectionChanged="RandomPlayCategoryComboBox_SelectionChanged">
<ComboBoxItem Content="國語排行" Tag="0"/>
<ComboBoxItem Content="台語排行" Tag="1"/>
<ComboBoxItem Content="新進歌曲" Tag="2"/>
<ComboBoxItem Content="全部排行" Tag="3"/>
<ComboBoxItem Content="我的最愛" Tag="10"/>
</ComboBox>
<ComboBox x:Name="RandomPlayFavoriteUserComboBox"
Width="150" Height="35"
FontSize="{StaticResource OptionsDescriptionFontSize}"
Foreground="{DynamicResource MaterialDesignBody}"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Margin="0,0,10,0"
Visibility="Collapsed"/>
<ComboBox x:Name="RandomPlayAudioChannelComboBox"
Width="100" Height="35"
FontSize="{StaticResource OptionsDescriptionFontSize}"
Foreground="{DynamicResource MaterialDesignBody}"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
SelectionChanged="RandomPlayAudioChannelComboBox_SelectionChanged">
<ComboBoxItem Content="人聲" Tag="0"/>
<ComboBoxItem Content="伴唱" Tag="1"/>
</ComboBox>
</StackPanel>
</Grid>
</Border>
</Grid>
<!-- Row 3: Preview + Full Screen -->
<Grid Margin="0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Preview Option -->
<Border Grid.Column="0" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="點播螢幕顯示" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<ToggleButton Name="PreviewToggle" Grid.Column="1"
Style="{StaticResource ThemedSwitchToggleButton}"
VerticalAlignment="Center"
Checked="PreviewToggle_Checked"
Unchecked="PreviewToggle_Unchecked"/>
</Grid>
</Border>
<!-- System Option -->
<Border Grid.Column="2" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="保持全螢幕播放" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<ToggleButton Name="FullScreenButton" Grid.Column="1"
Style="{StaticResource ThemedSwitchToggleButton}"
VerticalAlignment="Center"
Checked="AlwaysFullScreen_Checked"
Unchecked="AlwaysFullScreen_UnChecked"/>
</Grid>
</Border>
</Grid>
<!-- Row 4: Limit Cursor + New Song Days -->
<Grid Margin="0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="限制游標於主螢幕" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<ToggleButton Name="LimitCursorToggle" Grid.Column="1"
Style="{StaticResource ThemedSwitchToggleButton}"
VerticalAlignment="Center"
Checked="LimitCursorToggle_Checked"
Unchecked="LimitCursorToggle_Unchecked"/>
</Grid>
</Border>
<!-- Volume Option (New Song Days) -->
<Border Grid.Column="2" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="新進歌曲天數" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<TextBox x:Name="NewSongDaysTextBox" Grid.Column="1"
Style="{x:Null}"
Width="100" Height="40"
FontSize="{StaticResource OptionsItemLabelFontSize}"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
TextAlignment="Center"
Padding="5"
BorderBrush="{DynamicResource MaterialDesignDivider}"
BorderThickness="1"
Background="{DynamicResource MaterialDesignTextFieldBoxBackground}"
Foreground="{DynamicResource MaterialDesignBody}"
PreviewTextInput="NewSongDaysTextBox_PreviewTextInput"/>
</Grid>
</Border>
</Grid>
<!-- Row 5: Song Sort + Sync Music -->
<Grid Margin="0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="歌曲排序方式" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<ComboBox x:Name="SongSortMethodComboBox" Grid.Column="1"
Width="150" Height="40"
FontSize="{StaticResource OptionsItemButtonFontSize}"
Foreground="{DynamicResource MaterialDesignBody}"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
SelectionChanged="SongSortMethodComboBox_SelectionChanged">
<ComboBoxItem Content="點播次數" Tag="1"/>
<ComboBoxItem Content="加歌日期" Tag="2"/>
<ComboBoxItem Content="字數" Tag="3"/>
</ComboBox>
</Grid>
</Border>
<!-- Legacy Audio Channel Definition -->
<Border Grid.Column="2" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="舊版聲道定義" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<ToggleButton Name="LegacyAudioChannelToggle" Grid.Column="1"
Style="{StaticResource ThemedSwitchToggleButton}"
VerticalAlignment="Center"
Checked="LegacyAudioChannelToggle_Changed"
Unchecked="LegacyAudioChannelToggle_Changed"/>
</Grid>
</Border>
</Grid>
<!-- Row 6: Pre-Loading + App Logger -->
<Grid Margin="0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Pre-Loading Option -->
<Border Grid.Column="0" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="預先讀取" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<ToggleButton Name="PreLoadingToggle" Grid.Column="1"
Style="{StaticResource ThemedSwitchToggleButton}"
VerticalAlignment="Center"
Checked="PreLoadingToggle_Checked"
Unchecked="PreLoadingToggle_Unchecked"/>
</Grid>
</Border>
<Border Grid.Column="2" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="APP記錄檔" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<ToggleButton Name="AppLoggerToggle" Grid.Column="1"
Style="{StaticResource ThemedSwitchToggleButton}"
VerticalAlignment="Center"
Checked="AppLoggerToggle_Checked"
Unchecked="AppLoggerToggle_Unchecked"/>
</Grid>
</Border>
</Grid>
<!-- Row 7: Network Username + Play History -->
<Grid Margin="0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Network Remote Song Username Recording Option -->
<Border Grid.Column="0" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="網路點播使用者記名" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<ToggleButton Name="NetworkRemoteSongUsernameToggle" Grid.Column="1"
Style="{StaticResource ThemedSwitchToggleButton}"
VerticalAlignment="Center"
Checked="NetworkRemoteSongUsernameToggle_Checked"
Unchecked="NetworkRemoteSongUsernameToggle_Unchecked"/>
</Grid>
</Border>
<Border Grid.Column="2" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="播放記錄自動保存次數" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}" Margin="0,0,10,0"/>
<Slider Grid.Column="1" Name="PlayHistoryCountSlider" Minimum="1" Maximum="10" Value="5"
TickFrequency="1" IsSnapToTickEnabled="True" VerticalAlignment="Center"
ValueChanged="PlayHistoryCountSlider_ValueChanged"/>
<TextBlock Grid.Column="2" Name="PlayHistoryCountValue" Text="5" FontSize="{StaticResource OptionsItemLabelFontSize}"
FontWeight="Bold" VerticalAlignment="Center" Margin="10,0,0,0" Width="30" TextAlignment="Right"
Foreground="{DynamicResource MaterialDesignBody}"/>
</Grid>
</Border>
</Grid>
<!-- Row 8: Play Count + Audio Amplify -->
<Grid Margin="0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Play Count -->
<Border Grid.Column="0" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Text="點播次數更新" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold" VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center">
<Slider x:Name="PlayCountSlider" Width="200" Minimum="10" Maximum="90"
IsSnapToTickEnabled="True" TickFrequency="1"
VerticalAlignment="Center"
ValueChanged="PlayCountSlider_ValueChanged" />
<TextBlock x:Name="PlayCountValueText"
Text="{Binding ElementName=PlayCountSlider, Path=Value, StringFormat={}{0:F0}%}"
FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold" Width="60" TextAlignment="Right"
VerticalAlignment="Center" Margin="10,0,0,0"
Foreground="{DynamicResource MaterialDesignBody}"/>
</StackPanel>
<TextBlock Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
Text="設定歌曲播放進度超過多少百分比時,計入一次點播次數 (範圍: 10% - 90%)"
FontSize="{StaticResource OptionsDescriptionFontSize}" Opacity="0.7" Margin="0,4,0,0"
VerticalAlignment="Top" TextWrapping="Wrap" Foreground="{DynamicResource MaterialDesignBody}"/>
</Grid>
</Border>
<!-- Audio Amplify Setting -->
<Border Grid.Column="2" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50" VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="音響增益值" VerticalAlignment="Center" FontSize="{StaticResource OptionsItemLabelFontSize}" Margin="0,0,20,0" Foreground="{DynamicResource MaterialDesignBody}"/>
<Slider x:Name="AudioAmplifySlider" Grid.Column="1" Minimum="100" Maximum="500"
IsSnapToTickEnabled="True"
TickFrequency="10"
VerticalAlignment="Center"
ValueChanged="AudioAmplifySlider_ValueChanged"/>
<TextBlock Grid.Column="2" Text="{Binding ElementName=AudioAmplifySlider, Path=Value, StringFormat={}{0:F0}}"
VerticalAlignment="Center" FontSize="{StaticResource OptionsItemLabelFontSize}" Margin="20,0,0,0"
MinWidth="40" TextAlignment="Right" Foreground="{DynamicResource MaterialDesignBody}"/>
</Grid>
</Border>
</Grid>
<!-- Row 9: Video Renderer + Audio Renderer -->
<Grid Margin="0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Video Renderer -->
<Border Grid.Column="0" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="視訊渲染器" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<ComboBox x:Name="VideoRendererComboBox" Grid.Column="1"
Width="150" Height="40"
FontSize="{StaticResource OptionsItemButtonFontSize}"
Foreground="{DynamicResource MaterialDesignBody}"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
SelectionChanged="VideoRendererComboBox_SelectionChanged">
<ComboBoxItem Content="VMR9" Tag="0"/>
<ComboBoxItem Content="EVR" Tag="1"/>
</ComboBox>
</Grid>
</Border>
<!-- Audio Renderer -->
<Border Grid.Column="2" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="音訊輸出裝置" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}" Margin="0,0,10,0"/>
<ComboBox x:Name="AudioRendererComboBox" Grid.Column="1"
Height="40"
FontSize="{StaticResource OptionsSmallFontSize}"
Foreground="{DynamicResource MaterialDesignBody}"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
SelectionChanged="AudioRendererComboBox_SelectionChanged"/>
</Grid>
</Border>
</Grid>
<!-- Row 10: HW Acceleration -->
<Grid Margin="0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Enable HW Accel -->
<Border Grid.Column="0" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="啟用硬體解碼" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<ToggleButton Name="EnableHWAccelToggle" Grid.Column="1"
Style="{StaticResource ThemedSwitchToggleButton}"
VerticalAlignment="Center"
Checked="EnableHWAccelToggle_Checked"
Unchecked="EnableHWAccelToggle_Unchecked"/>
</Grid>
</Border>
<!-- HW Accel Mode -->
<Border Grid.Column="2" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="硬體解碼方式" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<ComboBox x:Name="HWAccelModeComboBox" Grid.Column="1"
Width="250" Height="40"
FontSize="{StaticResource OptionsSmallFontSize}"
Foreground="{DynamicResource MaterialDesignBody}"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
SelectionChanged="HWAccelModeComboBox_SelectionChanged">
<ComboBoxItem Content="AutoDetect" Tag="0"/>
<ComboBoxItem Content="NVIDIA CUVID" Tag="1"/>
<ComboBoxItem Content="Intel® Quick Sync" Tag="2"/>
<ComboBoxItem Content="DXVA2 (copy-back)" Tag="3"/>
<ComboBoxItem Content="DXVA2 (native)" Tag="4"/>
<ComboBoxItem Content="D3D11" Tag="5"/>
</ComboBox>
</Grid>
</Border>
</Grid>
<!-- Row 11: Language Filter settings -->
<Grid Margin="0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Language Multi-Select -->
<Border Grid.Column="0" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="語系點歌複選" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<ToggleButton Name="LanguageMultiSelectToggle" Grid.Column="1"
Style="{StaticResource ThemedSwitchToggleButton}"
VerticalAlignment="Center"/>
</Grid>
</Border>
</Grid>
<!-- Row 12: Recording settings (Enable Recording & Audio Input) -->
<Grid Margin="0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Enable Recording (Left) -->
<Border Grid.Column="0" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="啟用錄音功能" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}"/>
<ToggleButton Name="EnableRecordingToggle" Grid.Column="1"
Style="{StaticResource ThemedSwitchToggleButton}"
VerticalAlignment="Center"
Checked="EnableRecordingToggle_Checked"
Unchecked="EnableRecordingToggle_Unchecked"/>
</Grid>
</Border>
<!-- Audio Input Device (Right) -->
<Border x:Name="RecordingDeviceBorder" Grid.Column="2" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="錄音輸入裝置" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}" Margin="0,0,10,0"/>
<ComboBox x:Name="AudioInputDeviceComboBox" Grid.Column="1"
Height="40"
FontSize="{StaticResource OptionsSmallFontSize}"
Foreground="{DynamicResource MaterialDesignBody}"
VerticalAlignment="Center"
VerticalContentAlignment="Center"/>
</Grid>
</Border>
</Grid>
<!-- Row 13: Recording Path (Full Width) -->
<Grid Margin="0,2">
<Border x:Name="RecordingPathBorder" Background="{DynamicResource MaterialDesignCardBackground}"
Padding="8" CornerRadius="5" Effect="{DynamicResource MaterialDesignShadowDepth1}">
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="錄音檔存放路徑" FontSize="{StaticResource OptionsItemLabelFontSize}" FontWeight="SemiBold"
VerticalAlignment="Center" Foreground="{DynamicResource MaterialDesignBody}" Margin="0,0,20,0"/>
<TextBlock x:Name="RecordingPathText" Grid.Column="1"
Text="Recordings"
FontSize="{StaticResource OptionsDescriptionFontSize}"
VerticalAlignment="Center"
TextTrimming="CharacterEllipsis"
ToolTip="{Binding Text, RelativeSource={RelativeSource Self}}"
Foreground="{DynamicResource MaterialDesignBody}"/>
<Button x:Name="BrowseRecordingPathButton" Grid.Column="2"
Content="瀏覽..."
Style="{DynamicResource MaterialDesignOutlinedButton}"
FontSize="{StaticResource OptionsSmallFontSize}"
Height="35"
Margin="20,0,0,0"
Click="BrowseRecordingPath_Click"/>
</Grid>
</Border>
</Grid>
</StackPanel>
</ScrollViewer>
<!-- Footer -->
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,10,0,10">
<Button Name="ApplyButton" Content="套用設定"
Style="{DynamicResource MaterialDesignRaisedButton}"
FontSize="{StaticResource OptionsFooterButtonFontSize}" Height="45"
Margin="5,0" Padding="10,8"
VerticalContentAlignment="Center"
Background="{DynamicResource PrimaryHueMidBrush}"
Foreground="{DynamicResource PrimaryHueMidForegroundBrush}"
Click="ApplyButton_Click"/>
<Button Name="CancelButton" Content="取消"
Style="{DynamicResource MaterialDesignOutlinedButton}"
FontSize="{StaticResource OptionsFooterButtonFontSize}" Height="45"
Margin="5,0" Padding="10,8"
VerticalContentAlignment="Center"
BorderBrush="{DynamicResource PrimaryHueMidBrush}"
Foreground="{DynamicResource PrimaryHueMidBrush}"
Click="CancelButton_Click"/>
<Button Name="LeaveButton" Content="離開"
Style="{DynamicResource MaterialDesignOutlinedButton}"
FontSize="{StaticResource OptionsFooterButtonFontSize}" Height="45"
Margin="5,0" Padding="10,8"
VerticalContentAlignment="Center"
BorderBrush="{DynamicResource PrimaryHueMidBrush}"
Foreground="{DynamicResource PrimaryHueMidBrush}"
Click="LeaveButton_Click"/>
</StackPanel>
</Grid>
</Border>
</Viewbox>
</Window>