refactor(UI): 重构悬浮窗拦截设置界面布局

将悬浮窗拦截设置从LabeledSettingsCard改为SettingsCard和ToggleSwitch组合
优化界面结构,使开关控件更直观
添加Expander控制拦截规则的显示状态
This commit is contained in:
PrefacedCorg
2026-04-26 20:26:24 +08:00
parent 7ef231a4c7
commit 3ab9fcc857
3 changed files with 158 additions and 90 deletions
@@ -8,6 +8,7 @@
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf" xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
xmlns:i18n="clr-namespace:Ink_Canvas.MarkupExtensions" xmlns:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls" xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls"
xmlns:c="clr-namespace:Ink_Canvas.Converter"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" mc:Ignorable="d"
Title="自动化"> Title="自动化">
@@ -17,6 +18,7 @@
<FrameworkElement.Resources> <FrameworkElement.Resources>
<sys:Double x:Key="SettingsCardSpacing">4</sys:Double> <sys:Double x:Key="SettingsCardSpacing">4</sys:Double>
<sys:Double x:Key="SettingsCardHeaderIconMaxSize">24</sys:Double> <sys:Double x:Key="SettingsCardHeaderIconMaxSize">24</sys:Double>
<c:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<Style x:Key="SettingsSectionHeaderTextBlockStyle" <Style x:Key="SettingsSectionHeaderTextBlockStyle"
BasedOn="{StaticResource BodyStrongTextBlockStyle}" BasedOn="{StaticResource BodyStrongTextBlockStyle}"
TargetType="TextBlock"> TargetType="TextBlock">
@@ -285,72 +287,134 @@
Icon="{x:Static ui:SegoeFluentIcons.Save}" Icon="{x:Static ui:SegoeFluentIcons.Save}"
Toggled="ToggleSwitchSaveFullPageStrokes_Toggled"/> Toggled="ToggleSwitchSaveFullPageStrokes_Toggled"/>
<TextBlock Text="悬浮窗拦截" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/> <ui:SettingsExpander x:Name="ExpanderFloatingWindowInterceptor"
<controls:LabeledSettingsCard x:Name="CardFloatingWindowInterceptorEnabled"
Header="启用悬浮窗拦截" Header="启用悬浮窗拦截"
Icon="{x:Static ui:SegoeFluentIcons.Shield}" d:IsExpanded="True">
Toggled="ToggleSwitchFloatingWindowInterceptorEnabled_Toggled"/>
<ui:SettingsExpander Header="拦截规则"
Visibility="{Binding IsOn, ElementName=CardFloatingWindowInterceptorEnabled, Converter={StaticResource BooleanToVisibilityConverter}}"
IsExpanded="{Binding IsOn, ElementName=CardFloatingWindowInterceptorEnabled, Mode=OneWay}">
<ui:SettingsExpander.HeaderIcon> <ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Filter}"/> <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Shield}"/>
</ui:SettingsExpander.HeaderIcon> </ui:SettingsExpander.HeaderIcon>
<ui:ToggleSwitch x:Name="ToggleSwitchFloatingWindowInterceptorEnabled"
OnContent="{DynamicResource Common_On}"
OffContent="{DynamicResource Common_Off}"
Toggled="ToggleSwitchFloatingWindowInterceptorEnabled_Toggled"/>
<ui:SettingsExpander.Items> <ui:SettingsExpander.Items>
<controls:LabeledSettingsCard x:Name="CardSeewoWhiteboard3Floating" <ui:SettingsCard Header="{i18n:I18n Key=FloatingInterceptor_App_SeewoBoard3}">
Header="{i18n:I18n Key=FloatingInterceptor_App_SeewoBoard3}" <ui:SettingsCard.HeaderIcon>
IconSource="/Resources/Icons-png/EasiNote3.png" <ui:ImageIcon Source="/Resources/Icons-png/EasiNote3.png"/>
Toggled="ToggleSwitchSeewoWhiteboard3Floating_Toggled"/> </ui:SettingsCard.HeaderIcon>
<controls:LabeledSettingsCard x:Name="CardSeewoWhiteboard5Floating" <ui:ToggleSwitch x:Name="ToggleSwitchSeewoWhiteboard3Floating"
Header="{i18n:I18n Key=FloatingInterceptor_App_SeewoBoard5}" OnContent="{DynamicResource Common_On}"
IconSource="/Resources/Icons-png/EasiNote.png" OffContent="{DynamicResource Common_Off}"
Toggled="ToggleSwitchSeewoWhiteboard5Floating_Toggled"/> Toggled="ToggleSwitchSeewoWhiteboard3Floating_Toggled"/>
<controls:LabeledSettingsCard x:Name="CardSeewoWhiteboard5CFloating" </ui:SettingsCard>
Header="{i18n:I18n Key=FloatingInterceptor_App_SeewoBoard5C}" <ui:SettingsCard Header="{i18n:I18n Key=FloatingInterceptor_App_SeewoBoard5}">
IconSource="/Resources/Icons-png/EasiNote5C.png" <ui:SettingsCard.HeaderIcon>
Toggled="ToggleSwitchSeewoWhiteboard5CFloating_Toggled"/> <ui:ImageIcon Source="/Resources/Icons-png/EasiNote.png"/>
<controls:LabeledSettingsCard x:Name="CardSeewoPincoSideBarFloating" </ui:SettingsCard.HeaderIcon>
Header="{i18n:I18n Key=FloatingInterceptor_App_SeewoPinco}" <ui:ToggleSwitch x:Name="ToggleSwitchSeewoWhiteboard5Floating"
IconSource="/Resources/Icons-png/SeewoPinco.png" OnContent="{DynamicResource Common_On}"
Toggled="ToggleSwitchSeewoPincoSideBarFloating_Toggled"/> OffContent="{DynamicResource Common_Off}"
<controls:LabeledSettingsCard x:Name="CardSeewoPincoDrawingFloating" Toggled="ToggleSwitchSeewoWhiteboard5Floating_Toggled"/>
Header="{i18n:I18n Key=FloatingInterceptor_App_SeewoPincoDrawing}" </ui:SettingsCard>
IconSource="/Resources/Icons-png/SeewoPinco.png" <ui:SettingsCard Header="{i18n:I18n Key=FloatingInterceptor_App_SeewoBoard5C}">
Toggled="ToggleSwitchSeewoPincoDrawingFloating_Toggled"/> <ui:SettingsCard.HeaderIcon>
<controls:LabeledSettingsCard x:Name="CardSeewoPPTFloating" <ui:ImageIcon Source="/Resources/Icons-png/EasiNote5C.png"/>
Header="{i18n:I18n Key=FloatingInterceptor_App_SeewoPPTTools}" </ui:SettingsCard.HeaderIcon>
IconSource="/Resources/Icons-png/PPTTools.png" <ui:ToggleSwitch x:Name="ToggleSwitchSeewoWhiteboard5CFloating"
Toggled="ToggleSwitchSeewoPPTFloating_Toggled"/> OnContent="{DynamicResource Common_On}"
<controls:LabeledSettingsCard x:Name="CardAiClassFloating" OffContent="{DynamicResource Common_Off}"
Header="{i18n:I18n Key=FloatingInterceptor_App_AiClass}" Toggled="ToggleSwitchSeewoWhiteboard5CFloating_Toggled"/>
IconSource="/Resources/Icons-png/AiClass.png" </ui:SettingsCard>
Toggled="ToggleSwitchAiClassFloating_Toggled"/> <ui:SettingsCard Header="{i18n:I18n Key=FloatingInterceptor_App_SeewoPinco}">
<controls:LabeledSettingsCard x:Name="CardHiteAnnotationFloating" <ui:SettingsCard.HeaderIcon>
Header="{i18n:I18n Key=FloatingInterceptor_App_HiteAnnotation}" <ui:ImageIcon Source="/Resources/Icons-png/SeewoPinco.png"/>
IconSource="/Resources/Icons-png/HiteAnnotation.png" </ui:SettingsCard.HeaderIcon>
Toggled="ToggleSwitchHiteAnnotationFloating_Toggled"/> <ui:ToggleSwitch x:Name="ToggleSwitchSeewoPincoSideBarFloating"
<controls:LabeledSettingsCard x:Name="CardChangYanFloating" OnContent="{DynamicResource Common_On}"
Header="{i18n:I18n Key=FloatingInterceptor_App_ChangYanClass}" OffContent="{DynamicResource Common_Off}"
IconSource="/Resources/Icons-png/畅言智慧课堂.png" Toggled="ToggleSwitchSeewoPincoSideBarFloating_Toggled"/>
Toggled="ToggleSwitchChangYanFloating_Toggled"/> </ui:SettingsCard>
<controls:LabeledSettingsCard x:Name="CardChangYanPptFloating" <ui:SettingsCard Header="{i18n:I18n Key=FloatingInterceptor_App_SeewoPincoDrawing}">
Header="{i18n:I18n Key=FloatingInterceptor_App_ChangYanPPT}" <ui:SettingsCard.HeaderIcon>
IconSource="/Resources/Icons-png/畅言智慧课堂.png" <ui:ImageIcon Source="/Resources/Icons-png/SeewoPinco.png"/>
Toggled="ToggleSwitchChangYanPptFloating_Toggled"/> </ui:SettingsCard.HeaderIcon>
<controls:LabeledSettingsCard x:Name="CardIntelligentClassFloating" <ui:ToggleSwitch x:Name="ToggleSwitchSeewoPincoDrawingFloating"
Header="{i18n:I18n Key=FloatingInterceptor_App_IntelligentClass}" OnContent="{DynamicResource Common_On}"
IconSource="/Resources/Icons-png/天喻教育云.png" OffContent="{DynamicResource Common_Off}"
Toggled="ToggleSwitchIntelligentClassFloating_Toggled"/> Toggled="ToggleSwitchSeewoPincoDrawingFloating_Toggled"/>
<controls:LabeledSettingsCard x:Name="CardSeewoDesktopAnnotationFloating" </ui:SettingsCard>
Header="{i18n:I18n Key=FloatingInterceptor_App_SeewoDesktopAnnotation}" <ui:SettingsCard Header="{i18n:I18n Key=FloatingInterceptor_App_SeewoPPTTools}">
IconSource="/Resources/Icons-png/Seewo2Annotation.png" <ui:SettingsCard.HeaderIcon>
Toggled="ToggleSwitchSeewoDesktopAnnotationFloating_Toggled"/> <ui:ImageIcon Source="/Resources/Icons-png/PPTTools.png"/>
<controls:LabeledSettingsCard x:Name="CardSeewoDesktopSideBarFloating" </ui:SettingsCard.HeaderIcon>
Header="{i18n:I18n Key=FloatingInterceptor_App_SeewoDesktopSideBar}" <ui:ToggleSwitch x:Name="ToggleSwitchSeewoPPTFloating"
IconSource="/Resources/Icons-png/Seewo2Annotation.png" OnContent="{DynamicResource Common_On}"
Toggled="ToggleSwitchSeewoDesktopSideBarFloating_Toggled"/> OffContent="{DynamicResource Common_Off}"
Toggled="ToggleSwitchSeewoPPTFloating_Toggled"/>
</ui:SettingsCard>
<ui:SettingsCard Header="{i18n:I18n Key=FloatingInterceptor_App_AiClass}">
<ui:SettingsCard.HeaderIcon>
<ui:ImageIcon Source="/Resources/Icons-png/AiClass.png"/>
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch x:Name="ToggleSwitchAiClassFloating"
OnContent="{DynamicResource Common_On}"
OffContent="{DynamicResource Common_Off}"
Toggled="ToggleSwitchAiClassFloating_Toggled"/>
</ui:SettingsCard>
<ui:SettingsCard Header="{i18n:I18n Key=FloatingInterceptor_App_HiteAnnotation}">
<ui:SettingsCard.HeaderIcon>
<ui:ImageIcon Source="/Resources/Icons-png/HiteAnnotation.png"/>
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch x:Name="ToggleSwitchHiteAnnotationFloating"
OnContent="{DynamicResource Common_On}"
OffContent="{DynamicResource Common_Off}"
Toggled="ToggleSwitchHiteAnnotationFloating_Toggled"/>
</ui:SettingsCard>
<ui:SettingsCard Header="{i18n:I18n Key=FloatingInterceptor_App_ChangYanClass}">
<ui:SettingsCard.HeaderIcon>
<ui:ImageIcon Source="/Resources/Icons-png/畅言智慧课堂.png"/>
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch x:Name="ToggleSwitchChangYanFloating"
OnContent="{DynamicResource Common_On}"
OffContent="{DynamicResource Common_Off}"
Toggled="ToggleSwitchChangYanFloating_Toggled"/>
</ui:SettingsCard>
<ui:SettingsCard Header="{i18n:I18n Key=FloatingInterceptor_App_ChangYanPPT}">
<ui:SettingsCard.HeaderIcon>
<ui:ImageIcon Source="/Resources/Icons-png/畅言智慧课堂.png"/>
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch x:Name="ToggleSwitchChangYanPptFloating"
OnContent="{DynamicResource Common_On}"
OffContent="{DynamicResource Common_Off}"
Toggled="ToggleSwitchChangYanPptFloating_Toggled"/>
</ui:SettingsCard>
<ui:SettingsCard Header="{i18n:I18n Key=FloatingInterceptor_App_IntelligentClass}">
<ui:SettingsCard.HeaderIcon>
<ui:ImageIcon Source="/Resources/Icons-png/天喻教育云.png"/>
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch x:Name="ToggleSwitchIntelligentClassFloating"
OnContent="{DynamicResource Common_On}"
OffContent="{DynamicResource Common_Off}"
Toggled="ToggleSwitchIntelligentClassFloating_Toggled"/>
</ui:SettingsCard>
<ui:SettingsCard Header="{i18n:I18n Key=FloatingInterceptor_App_SeewoDesktopAnnotation}">
<ui:SettingsCard.HeaderIcon>
<ui:ImageIcon Source="/Resources/Icons-png/Seewo2Annotation.png"/>
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch x:Name="ToggleSwitchSeewoDesktopAnnotationFloating"
OnContent="{DynamicResource Common_On}"
OffContent="{DynamicResource Common_Off}"
Toggled="ToggleSwitchSeewoDesktopAnnotationFloating_Toggled"/>
</ui:SettingsCard>
<ui:SettingsCard Header="{i18n:I18n Key=FloatingInterceptor_App_SeewoDesktopSideBar}">
<ui:SettingsCard.HeaderIcon>
<ui:ImageIcon Source="/Resources/Icons-png/Seewo2Annotation.png"/>
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch x:Name="ToggleSwitchSeewoDesktopSideBarFloating"
OnContent="{DynamicResource Common_On}"
OffContent="{DynamicResource Common_Off}"
Toggled="ToggleSwitchSeewoDesktopSideBarFloating_Toggled"/>
</ui:SettingsCard>
</ui:SettingsExpander.Items> </ui:SettingsExpander.Items>
</ui:SettingsExpander> </ui:SettingsExpander>
@@ -96,22 +96,23 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
SideControlMinimumAutomationSlider.Value = auto.MinimumAutomationStrokeNumber; SideControlMinimumAutomationSlider.Value = auto.MinimumAutomationStrokeNumber;
CardSaveFullPageStrokes.IsOn = auto.IsSaveFullPageStrokes; CardSaveFullPageStrokes.IsOn = auto.IsSaveFullPageStrokes;
CardFloatingWindowInterceptorEnabled.IsOn = auto.FloatingWindowInterceptor.IsEnabled; ToggleSwitchFloatingWindowInterceptorEnabled.IsOn = auto.FloatingWindowInterceptor.IsEnabled;
ExpanderFloatingWindowInterceptor.IsExpanded = auto.FloatingWindowInterceptor.IsEnabled;
if (auto.FloatingWindowInterceptor.InterceptRules != null) if (auto.FloatingWindowInterceptor.InterceptRules != null)
{ {
CardSeewoWhiteboard3Floating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoWhiteboard3Floating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoWhiteboard3Floating"]; ToggleSwitchSeewoWhiteboard3Floating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoWhiteboard3Floating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoWhiteboard3Floating"];
CardSeewoWhiteboard5Floating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoWhiteboard5Floating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoWhiteboard5Floating"]; ToggleSwitchSeewoWhiteboard5Floating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoWhiteboard5Floating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoWhiteboard5Floating"];
CardSeewoWhiteboard5CFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoWhiteboard5CFloating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoWhiteboard5CFloating"]; ToggleSwitchSeewoWhiteboard5CFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoWhiteboard5CFloating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoWhiteboard5CFloating"];
CardSeewoPincoSideBarFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoPincoSideBarFloating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoPincoSideBarFloating"]; ToggleSwitchSeewoPincoSideBarFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoPincoSideBarFloating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoPincoSideBarFloating"];
CardSeewoPincoDrawingFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoPincoDrawingFloating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoPincoDrawingFloating"]; ToggleSwitchSeewoPincoDrawingFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoPincoDrawingFloating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoPincoDrawingFloating"];
CardSeewoPPTFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoPPTFloating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoPPTFloating"]; ToggleSwitchSeewoPPTFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoPPTFloating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoPPTFloating"];
CardAiClassFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("AiClassFloating") && auto.FloatingWindowInterceptor.InterceptRules["AiClassFloating"]; ToggleSwitchAiClassFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("AiClassFloating") && auto.FloatingWindowInterceptor.InterceptRules["AiClassFloating"];
CardHiteAnnotationFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("HiteAnnotationFloating") && auto.FloatingWindowInterceptor.InterceptRules["HiteAnnotationFloating"]; ToggleSwitchHiteAnnotationFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("HiteAnnotationFloating") && auto.FloatingWindowInterceptor.InterceptRules["HiteAnnotationFloating"];
CardChangYanFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("ChangYanFloating") && auto.FloatingWindowInterceptor.InterceptRules["ChangYanFloating"]; ToggleSwitchChangYanFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("ChangYanFloating") && auto.FloatingWindowInterceptor.InterceptRules["ChangYanFloating"];
CardChangYanPptFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("ChangYanPptFloating") && auto.FloatingWindowInterceptor.InterceptRules["ChangYanPptFloating"]; ToggleSwitchChangYanPptFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("ChangYanPptFloating") && auto.FloatingWindowInterceptor.InterceptRules["ChangYanPptFloating"];
CardIntelligentClassFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("IntelligentClassFloating") && auto.FloatingWindowInterceptor.InterceptRules["IntelligentClassFloating"]; ToggleSwitchIntelligentClassFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("IntelligentClassFloating") && auto.FloatingWindowInterceptor.InterceptRules["IntelligentClassFloating"];
CardSeewoDesktopAnnotationFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoDesktopAnnotationFloating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoDesktopAnnotationFloating"]; ToggleSwitchSeewoDesktopAnnotationFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoDesktopAnnotationFloating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoDesktopAnnotationFloating"];
CardSeewoDesktopSideBarFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoDesktopSideBarFloating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoDesktopSideBarFloating"]; ToggleSwitchSeewoDesktopSideBarFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoDesktopSideBarFloating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoDesktopSideBarFloating"];
} }
_isLoaded = true; _isLoaded = true;
@@ -480,7 +481,8 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
if (!_isLoaded) return; if (!_isLoaded) return;
var mw = GetMainWindow(); var mw = GetMainWindow();
if (mw == null) return; if (mw == null) return;
SettingsManager.Settings.Automation.FloatingWindowInterceptor.IsEnabled = CardFloatingWindowInterceptorEnabled.IsOn; SettingsManager.Settings.Automation.FloatingWindowInterceptor.IsEnabled = ToggleSwitchFloatingWindowInterceptorEnabled.IsOn;
ExpanderFloatingWindowInterceptor.IsExpanded = ToggleSwitchFloatingWindowInterceptorEnabled.IsOn;
if (mw._floatingWindowInterceptorManager != null) if (mw._floatingWindowInterceptorManager != null)
{ {
if (SettingsManager.Settings.Automation.FloatingWindowInterceptor.IsEnabled) if (SettingsManager.Settings.Automation.FloatingWindowInterceptor.IsEnabled)
@@ -494,79 +496,79 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
private void ToggleSwitchSeewoWhiteboard3Floating_Toggled(object sender, RoutedEventArgs e) private void ToggleSwitchSeewoWhiteboard3Floating_Toggled(object sender, RoutedEventArgs e)
{ {
if (!_isLoaded) return; if (!_isLoaded) return;
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoWhiteboard3Floating, CardSeewoWhiteboard3Floating.IsOn); GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoWhiteboard3Floating, ToggleSwitchSeewoWhiteboard3Floating.IsOn);
} }
private void ToggleSwitchSeewoWhiteboard5Floating_Toggled(object sender, RoutedEventArgs e) private void ToggleSwitchSeewoWhiteboard5Floating_Toggled(object sender, RoutedEventArgs e)
{ {
if (!_isLoaded) return; if (!_isLoaded) return;
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoWhiteboard5Floating, CardSeewoWhiteboard5Floating.IsOn); GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoWhiteboard5Floating, ToggleSwitchSeewoWhiteboard5Floating.IsOn);
} }
private void ToggleSwitchSeewoWhiteboard5CFloating_Toggled(object sender, RoutedEventArgs e) private void ToggleSwitchSeewoWhiteboard5CFloating_Toggled(object sender, RoutedEventArgs e)
{ {
if (!_isLoaded) return; if (!_isLoaded) return;
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoWhiteboard5CFloating, CardSeewoWhiteboard5CFloating.IsOn); GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoWhiteboard5CFloating, ToggleSwitchSeewoWhiteboard5CFloating.IsOn);
} }
private void ToggleSwitchSeewoPincoSideBarFloating_Toggled(object sender, RoutedEventArgs e) private void ToggleSwitchSeewoPincoSideBarFloating_Toggled(object sender, RoutedEventArgs e)
{ {
if (!_isLoaded) return; if (!_isLoaded) return;
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoPincoSideBarFloating, CardSeewoPincoSideBarFloating.IsOn); GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoPincoSideBarFloating, ToggleSwitchSeewoPincoSideBarFloating.IsOn);
} }
private void ToggleSwitchSeewoPincoDrawingFloating_Toggled(object sender, RoutedEventArgs e) private void ToggleSwitchSeewoPincoDrawingFloating_Toggled(object sender, RoutedEventArgs e)
{ {
if (!_isLoaded) return; if (!_isLoaded) return;
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoPincoDrawingFloating, CardSeewoPincoDrawingFloating.IsOn); GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoPincoDrawingFloating, ToggleSwitchSeewoPincoDrawingFloating.IsOn);
} }
private void ToggleSwitchSeewoPPTFloating_Toggled(object sender, RoutedEventArgs e) private void ToggleSwitchSeewoPPTFloating_Toggled(object sender, RoutedEventArgs e)
{ {
if (!_isLoaded) return; if (!_isLoaded) return;
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoPPTFloating, CardSeewoPPTFloating.IsOn); GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoPPTFloating, ToggleSwitchSeewoPPTFloating.IsOn);
} }
private void ToggleSwitchAiClassFloating_Toggled(object sender, RoutedEventArgs e) private void ToggleSwitchAiClassFloating_Toggled(object sender, RoutedEventArgs e)
{ {
if (!_isLoaded) return; if (!_isLoaded) return;
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.AiClassFloating, CardAiClassFloating.IsOn); GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.AiClassFloating, ToggleSwitchAiClassFloating.IsOn);
} }
private void ToggleSwitchHiteAnnotationFloating_Toggled(object sender, RoutedEventArgs e) private void ToggleSwitchHiteAnnotationFloating_Toggled(object sender, RoutedEventArgs e)
{ {
if (!_isLoaded) return; if (!_isLoaded) return;
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.HiteAnnotationFloating, CardHiteAnnotationFloating.IsOn); GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.HiteAnnotationFloating, ToggleSwitchHiteAnnotationFloating.IsOn);
} }
private void ToggleSwitchChangYanFloating_Toggled(object sender, RoutedEventArgs e) private void ToggleSwitchChangYanFloating_Toggled(object sender, RoutedEventArgs e)
{ {
if (!_isLoaded) return; if (!_isLoaded) return;
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.ChangYanFloating, CardChangYanFloating.IsOn); GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.ChangYanFloating, ToggleSwitchChangYanFloating.IsOn);
} }
private void ToggleSwitchChangYanPptFloating_Toggled(object sender, RoutedEventArgs e) private void ToggleSwitchChangYanPptFloating_Toggled(object sender, RoutedEventArgs e)
{ {
if (!_isLoaded) return; if (!_isLoaded) return;
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.ChangYanPptFloating, CardChangYanPptFloating.IsOn); GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.ChangYanPptFloating, ToggleSwitchChangYanPptFloating.IsOn);
} }
private void ToggleSwitchIntelligentClassFloating_Toggled(object sender, RoutedEventArgs e) private void ToggleSwitchIntelligentClassFloating_Toggled(object sender, RoutedEventArgs e)
{ {
if (!_isLoaded) return; if (!_isLoaded) return;
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.IntelligentClassFloating, CardIntelligentClassFloating.IsOn); GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.IntelligentClassFloating, ToggleSwitchIntelligentClassFloating.IsOn);
} }
private void ToggleSwitchSeewoDesktopAnnotationFloating_Toggled(object sender, RoutedEventArgs e) private void ToggleSwitchSeewoDesktopAnnotationFloating_Toggled(object sender, RoutedEventArgs e)
{ {
if (!_isLoaded) return; if (!_isLoaded) return;
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoDesktopAnnotationFloating, CardSeewoDesktopAnnotationFloating.IsOn); GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoDesktopAnnotationFloating, ToggleSwitchSeewoDesktopAnnotationFloating.IsOn);
} }
private void ToggleSwitchSeewoDesktopSideBarFloating_Toggled(object sender, RoutedEventArgs e) private void ToggleSwitchSeewoDesktopSideBarFloating_Toggled(object sender, RoutedEventArgs e)
{ {
if (!_isLoaded) return; if (!_isLoaded) return;
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoDesktopSideBarFloating, CardSeewoDesktopSideBarFloating.IsOn); GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoDesktopSideBarFloating, ToggleSwitchSeewoDesktopSideBarFloating.IsOn);
} }
#endregion #endregion
@@ -8,6 +8,7 @@
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf" xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
xmlns:i18n="clr-namespace:Ink_Canvas.MarkupExtensions" xmlns:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls" xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls"
xmlns:c="clr-namespace:Ink_Canvas.Converter"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" mc:Ignorable="d"
Title="{i18n:I18n Key=Nav_PPT_Settings}"> Title="{i18n:I18n Key=Nav_PPT_Settings}">
@@ -16,6 +17,7 @@
<Grid Margin="59,0,59,0"> <Grid Margin="59,0,59,0">
<FrameworkElement.Resources> <FrameworkElement.Resources>
<sys:Double x:Key="SettingsCardSpacing">4</sys:Double> <sys:Double x:Key="SettingsCardSpacing">4</sys:Double>
<c:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<Style x:Key="SettingsSectionHeaderTextBlockStyle" <Style x:Key="SettingsSectionHeaderTextBlockStyle"
BasedOn="{StaticResource BodyStrongTextBlockStyle}" BasedOn="{StaticResource BodyStrongTextBlockStyle}"
TargetType="TextBlock"> TargetType="TextBlock">