<ui:Page xmlns:props="clr-namespace:Ink_Canvas.Properties" x:Class="Ink_Canvas.Windows.SettingsViews.Pages.AutomationPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews.Pages"
      xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
      xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
      xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls"
      xmlns:c="clr-namespace:Ink_Canvas.Converter"
      xmlns:sys="clr-namespace:System;assembly=mscorlib"
      mc:Ignorable="d"
      Title="{x:Static props:AutomationStrings.Automation_Title}">

    <ScrollViewer PanningMode="VerticalFirst">
        <Grid Margin="59,0,59,0">
            <FrameworkElement.Resources>
                <sys:Double x:Key="SettingsCardSpacing">4</sys:Double>
                <sys:Double x:Key="SettingsCardHeaderIconMaxSize">24</sys:Double>
                <c:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
                <Style x:Key="SettingsSectionHeaderTextBlockStyle"
                    BasedOn="{StaticResource BodyStrongTextBlockStyle}"
                    TargetType="TextBlock">
                    <Style.Setters>
                        <Setter Property="Margin" Value="1,30,0,6" />
                    </Style.Setters>
                </Style>
            </FrameworkElement.Resources>
            <Grid>
                <ikw:SimpleStackPanel MaxWidth="1000"
                    HorizontalAlignment="Stretch"
                    Spacing="{StaticResource SettingsCardSpacing}">

                    <TextBlock Text="{x:Static props:AutomationStrings.Automation_AutoFoldTitle}" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>

                    <ui:SettingsExpander Header="{x:Static props:AutomationStrings.AutoFold_Group_Seewo}"
                            IsExpanded="True">
                        <ui:SettingsExpander.HeaderIcon>
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Edit}"/>
                        </ui:SettingsExpander.HeaderIcon>
                        <ui:SettingsExpander.Items>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.AutoFold_App_SeewoBoard5}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/EasiNote.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="CardAutoFoldInEasiNote" Toggled="ToggleSwitchAutoFoldInEasiNote_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.AutoFold_App_SeewoCamera}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/EasiCamera.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="CardAutoFoldInEasiCamera" Toggled="ToggleSwitchAutoFoldInEasiCamera_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.AutoFold_App_SeewoBoard3}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/EasiNote3.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="CardAutoFoldInEasiNote3" Toggled="ToggleSwitchAutoFoldInEasiNote3_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.AutoFold_App_SeewoLightBoard}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/EasiNote3C.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="CardAutoFoldInEasiNote3C" Toggled="ToggleSwitchAutoFoldInEasiNote3C_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.AutoFold_App_SeewoLightBoard5C}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/EasiNote5C.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="CardAutoFoldInEasiNote5C" Toggled="ToggleSwitchAutoFoldInEasiNote5C_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.FloatingInterceptor_App_SeewoPinco}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/SeewoPinco.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="CardAutoFoldInSeewoPincoTeacher" Toggled="ToggleSwitchAutoFoldInSeewoPincoTeacher_Toggled"/>
                            </ui:SettingsCard>
                        </ui:SettingsExpander.Items>
                    </ui:SettingsExpander>

                    <ui:SettingsExpander Header="{x:Static props:AutomationStrings.AutoFold_Group_Hite}"
                            IsExpanded="True">
                        <ui:SettingsExpander.HeaderIcon>
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Edit}"/>
                        </ui:SettingsExpander.HeaderIcon>
                        <ui:SettingsExpander.Items>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.AutoFold_App_HiteBoard}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/HiteBoard.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="CardAutoFoldInHiteTouchPro" Toggled="ToggleSwitchAutoFoldInHiteTouchPro_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.AutoFold_App_HiteCamera}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/HiteCamera.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="CardAutoFoldInHiteCamera" Toggled="ToggleSwitchAutoFoldInHiteCamera_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.AutoFold_App_HiteLightBoard}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/HiteLightBoard.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="CardAutoFoldInHiteLightBoard" Toggled="ToggleSwitchAutoFoldInHiteLightBoard_Toggled"/>
                            </ui:SettingsCard>
                        </ui:SettingsExpander.Items>
                    </ui:SettingsExpander>

                    <ui:SettingsExpander Header="{x:Static props:AutomationStrings.AutoFold_Group_Other}"
                            IsExpanded="True">
                        <ui:SettingsExpander.HeaderIcon>
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Edit}"/>
                        </ui:SettingsExpander.HeaderIcon>
                        <ui:SettingsExpander.Items>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.AutoFold_App_WenXiangBoard}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/WenXiang.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="CardAutoFoldInWxBoardMain" Toggled="ToggleSwitchAutoFoldInWxBoardMain_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.AutoFold_App_MSWhiteboard}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/Whiteboard.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="CardAutoFoldInMSWhiteboard" Toggled="ToggleSwitchAutoFoldInMSWhiteboard_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.AutoFold_App_AdmoxBoard}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/AdmoxWhiteboard.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="CardAutoFoldInAdmoxWhiteboard" Toggled="ToggleSwitchAutoFoldInAdmoxWhiteboard_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.AutoFold_App_AdmoxBooth}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/AdmoxBooth.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="CardAutoFoldInAdmoxBooth" Toggled="ToggleSwitchAutoFoldInAdmoxBooth_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.AutoFold_App_YiYunBoard}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/YiYunWhiteboard.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="CardAutoFoldInQPoint" Toggled="ToggleSwitchAutoFoldInQPoint_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.AutoFold_App_YiYunBooth}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/YiYunVisualPresenter.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="CardAutoFoldInYiYunVisualPresenter" Toggled="ToggleSwitchAutoFoldInYiYunVisualPresenter_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.AutoFold_App_MaxHubBoard}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/MaxHubWhiteboard.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="CardAutoFoldInMaxHubWhiteboard" Toggled="ToggleSwitchAutoFoldInMaxHubWhiteboard_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.AutoFold_OldZyBoard}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/Donview.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="CardAutoFoldInOldZyBoard" Toggled="ToggleSwitchAutoFoldInOldZyBoard_Toggled"/>
                            </ui:SettingsCard>
                        </ui:SettingsExpander.Items>
                    </ui:SettingsExpander>

                    <controls:LabeledSettingsCard x:Name="CardAutoFoldInPPTSlideShow"
                            Header="{x:Static props:AutomationStrings.Automation_AutoFoldInPPT}"
                            Toggled="ToggleSwitchAutoFoldInPPTSlideShow_Toggled">
                        <controls:LabeledSettingsCard.HeaderIcon>
                            <ui:ImageIcon Source="/Resources/Icons-png/Powerpoint.png"/>
                        </controls:LabeledSettingsCard.HeaderIcon>
                    </controls:LabeledSettingsCard>

                    <controls:LabeledSettingsCard x:Name="CardAutoFoldWhenExitWhiteboard"
                            Header="{x:Static props:AutomationStrings.FoldMode_AutoFoldAfterWhiteboard}"
                            Description="{x:Static props:AutomationStrings.FoldMode_AutoFoldAfterWhiteboardHint}"
                            Icon="{x:Static ui:SegoeFluentIcons.Back}"
                            Toggled="ToggleSwitchAutoFoldWhenExitWhiteboard_Toggled"/>

                    <controls:LabeledSettingsCard x:Name="CardAutoFoldAfterPPTSlideShow"
                            Header="{x:Static props:AutomationStrings.FoldMode_AutoFoldAfterPPT}"
                            Description="{x:Static props:AutomationStrings.FoldMode_AutoFoldAfterPPTHint}"
                            IconSource="/Resources/Icons-png/PPTTools.png"
                            Toggled="ToggleSwitchAutoFoldAfterPPTSlideShow_Toggled"/>

                    <controls:LabeledSettingsCard x:Name="CardKeepFoldAfterSoftwareExit"
                            Header="{x:Static props:AutomationStrings.Automation_KeepFoldAfterExit}"
                            Description="{x:Static props:AutomationStrings.Automation_KeepFoldAfterExitHint}"
                            Icon="{x:Static ui:SegoeFluentIcons.Pin}"
                            Toggled="ToggleSwitchKeepFoldAfterSoftwareExit_Toggled"/>

                    <TextBlock Text="{x:Static props:AutomationStrings.AutoKill_Title}" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>

                    <controls:LabeledSettingsCard x:Name="CardAutoKillPPTService"
                            Header="{x:Static props:AutomationStrings.AutoKill_PPTTools}"
                            Description="{x:Static props:AutomationStrings.AutoKill_PPTToolsHint}"
                            IconSource="/Resources/Icons-png/PPTTools.png"
                            Toggled="ToggleSwitchAutoKillPPTService_Toggled"/>

                    <controls:LabeledSettingsCard x:Name="CardAutoKillEasiNote"
                            Header="{x:Static props:AutomationStrings.AutoKill_EasiNote5}"
                            IconSource="/Resources/Icons-png/EasiNote.png"
                            Toggled="ToggleSwitchAutoKillEasiNote_Toggled"/>

                    <controls:LabeledSettingsCard x:Name="CardAutoKillHiteAnnotation"
                            Header="{x:Static props:AutomationStrings.AutoKill_HiteAnnotation}"
                            IconSource="/Resources/Icons-png/HiteAnnotation.png"
                            Toggled="ToggleSwitchAutoKillHiteAnnotation_Toggled"/>

                    <controls:LabeledSettingsCard x:Name="CardAutoKillVComYouJiao"
                            Header="{x:Static props:AutomationStrings.AutoKill_YouJiao}"
                            IconSource="/Resources/Icons-png/VComYouJiao.png"
                            Toggled="ToggleSwitchAutoKillVComYouJiao_Toggled"/>

                    <controls:LabeledSettingsCard x:Name="CardAutoKillSeewoLauncher2DesktopAnnotation"
                            Header="{x:Static props:AutomationStrings.AutoKill_SeewoDesktop2Anno}"
                            Description="{x:Static props:AutomationStrings.AutoKill_SeewoDesktop2AnnoHint}"
                            IconSource="/Resources/Icons-png/Seewo2Annotation.png"
                            Toggled="ToggleSwitchAutoKillSeewoLauncher2DesktopAnnotation_Toggled"/>

                    <controls:LabeledSettingsCard x:Name="CardAutoKillInkCanvas"
                            Header="{x:Static props:AutomationStrings.AutoKill_InkCanvasIC}"
                            IconSource="/Resources/Icons-png/InkCanvas.png"
                            Toggled="ToggleSwitchAutoKillInkCanvas_Toggled"/>

                    <controls:LabeledSettingsCard x:Name="CardAutoKillICA"
                            Header="{x:Static props:AutomationStrings.AutoKill_ICA}"
                            IconSource="/Resources/Icons-png/ICA.png"
                            Toggled="ToggleSwitchAutoKillICA_Toggled"/>

                    <controls:LabeledSettingsCard x:Name="CardAutoKillIDT"
                            Header="{x:Static props:AutomationStrings.AutoKill_Inkeys}"
                            IconSource="/Resources/Icons-png/idt.png"
                            Toggled="ToggleSwitchAutoKillIDT_Toggled"/>

                    <TextBlock Text="{x:Static props:AutomationStrings.AutoFold_Mode}" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>

                    <controls:LabeledSettingsCard x:Name="CardAutoEnterAnnotationModeWhenExitFoldMode"
                            Header="{x:Static props:AutomationStrings.FoldMode_ExitToAnnotation}"
                            Description="{x:Static props:AutomationStrings.FoldMode_ExitToAnnotationHint}"
                            Icon="{x:Static ui:SegoeFluentIcons.Edit}"
                            Toggled="ToggleSwitchAutoEnterAnnotationModeWhenExitFoldMode_Toggled"/>

                    <controls:LabeledSettingsCard x:Name="CardAutoEnterAnnotationAfterKillHite"
                            Header="{x:Static props:AutomationStrings.AutoKill_HiteAfterKillEnterAnnotation}"
                            IconSource="/Resources/Icons-png/HiteAnnotation.png"
                            Toggled="ToggleSwitchAutoEnterAnnotationAfterKillHite_Toggled"/>

                    <TextBlock Text="{x:Static props:StorageStrings.AutoSave_Title}" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>

                    <controls:LabeledSettingsCard x:Name="CardSaveScreenshotsInDateFolders"
                            Header="{x:Static props:StorageStrings.Storage_ScreenshotsByDateFolder}"
                            Icon="{x:Static ui:SegoeFluentIcons.Folder}"
                            Toggled="ToggleSwitchSaveScreenshotsInDateFolders_Toggled"/>

                    <controls:LabeledSettingsCard x:Name="CardAutoSaveStrokesAtScreenshot"
                            Header="{x:Static props:StorageStrings.Storage_AutoSaveInkOnScreenshot}"
                            Icon="{x:Static ui:SegoeFluentIcons.Save}"
                            Toggled="ToggleSwitchAutoSaveStrokesAtScreenshot_Toggled"/>

                    <controls:LabeledSettingsCard x:Name="CardAutoSaveStrokesAtClear"
                            Header="{x:Static props:StorageStrings.Storage_AutoScreenshotOnClear}"
                            Icon="{x:Static ui:SegoeFluentIcons.Save}"
                            Toggled="ToggleSwitchAutoSaveStrokesAtClear_Toggled"/>

                    <controls:LabeledSettingsCard x:Name="CardSaveStrokesAsXML"
                            Header="{x:Static props:StorageStrings.Storage_SaveAsXml}"
                            Icon="{x:Static ui:SegoeFluentIcons.Save}"
                            Toggled="ToggleSwitchSaveStrokesAsXML_Toggled"/>

                    <controls:LabeledSettingsCard x:Name="CardSaveStrokesAsUInk"
                            Header="{x:Static props:StorageStrings.Storage_SaveAsUInk}"
                            Icon="{x:Static ui:SegoeFluentIcons.Save}"
                            Toggled="ToggleSwitchSaveStrokesAsUInK_Toggled"/>

                    <controls:LabeledSettingsCard x:Name="CardEnableAutoSaveStrokes"
                            Header="{x:Static props:StorageStrings.Storage_AutoSaveInk}"
                            Description="{x:Static props:CanvasStrings.CanvasAndInkPanel_Hint_9}"
                            Icon="{x:Static ui:SegoeFluentIcons.Save}"
                            Toggled="ToggleSwitchEnableAutoSaveStrokes_Toggled"/>

                    <ui:SettingsCard Header="{x:Static props:StorageStrings.Storage_AutoSaveInterval}">
                        <ui:SettingsCard.HeaderIcon>
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.QuietHours}"/>
                        </ui:SettingsCard.HeaderIcon>
                        <ComboBox x:Name="ComboBoxAutoSaveStrokesInterval"
                                  SelectionChanged="ComboBoxAutoSaveStrokesInterval_SelectionChanged">
                            <ComboBoxItem Content="{x:Static props:StorageStrings.Storage_AutoSaveInterval_1Min}" Tag="1"/>
                            <ComboBoxItem Content="{x:Static props:StorageStrings.Storage_AutoSaveInterval_3Min}" Tag="3"/>
                            <ComboBoxItem Content="{x:Static props:StorageStrings.Storage_AutoSaveInterval_5Min}" Tag="5"/>
                            <ComboBoxItem Content="{x:Static props:StorageStrings.Storage_AutoSaveInterval_10Min}" Tag="10"/>
                            <ComboBoxItem Content="{x:Static props:StorageStrings.Storage_AutoSaveInterval_30Min}" Tag="30"/>
                        </ComboBox>
                    </ui:SettingsCard>

                    <controls:LabeledSettingsCard x:Name="CardAutoDelSavedFiles"
                            Header="{x:Static props:StorageStrings.Storage_AutoDeleteTitle}"
                            Icon="{x:Static ui:SegoeFluentIcons.Delete}"
                            Toggled="ToggleSwitchAutoDelSavedFiles_Toggled"/>

                    <ui:SettingsCard Header="{x:Static props:AutomationStrings.Storage_AutoDeleteDaysThreshold}">
                        <ui:SettingsCard.HeaderIcon>
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Calendar}"/>
                        </ui:SettingsCard.HeaderIcon>
                        <ComboBox x:Name="ComboBoxAutoDelSavedFilesDaysThreshold"
                                  SelectionChanged="ComboBoxAutoDelSavedFilesDaysThreshold_SelectionChanged">
                            <ComboBoxItem Content="7"/>
                            <ComboBoxItem Content="14"/>
                            <ComboBoxItem Content="30"/>
                            <ComboBoxItem Content="60"/>
                            <ComboBoxItem Content="90"/>
                        </ComboBox>
                    </ui:SettingsCard>

                    <ui:SettingsCard Header="{x:Static props:AutomationStrings.Storage_MinAutomationStrokes}">
                        <ui:SettingsCard.HeaderIcon>
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Calculator}"/>
                        </ui:SettingsCard.HeaderIcon>
                        <Slider x:Name="SideControlMinimumAutomationSlider" Minimum="1" Maximum="50" Width="200" ValueChanged="SideControlMinimumAutomationSlider_ValueChanged"/>
                    </ui:SettingsCard>

                    <controls:LabeledSettingsCard x:Name="CardSaveFullPageStrokes"
                            Header="{x:Static props:StorageStrings.Storage_SaveFullPageStrokes}"
                            Icon="{x:Static ui:SegoeFluentIcons.Save}"
                            Toggled="ToggleSwitchSaveFullPageStrokes_Toggled"/>

                    <controls:LabeledSettingsCard x:Name="CardUseCustomSaveFileName"
                            Header="{x:Static props:AutomationStrings.Automation_UseCustomSaveFileName_Header}"
                            Description="{x:Static props:AutomationStrings.Automation_UseCustomSaveFileName_Desc}"
                            Icon="{x:Static ui:SegoeFluentIcons.Edit}"
                            Toggled="ToggleSwitchUseCustomSaveFileName_Toggled"/>

                    <ui:SettingsExpander x:Name="CardSaveFileNamePreset" Header="{x:Static props:AutomationStrings.Automation_SaveFileNameFormat}"
                        IsExpanded="True">
                        <ui:SettingsExpander.HeaderIcon>
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Edit}"/>
                        </ui:SettingsExpander.HeaderIcon>
                        <ComboBox x:Name="ComboBoxSaveFileNamePreset"
                                  SelectionChanged="ComboBoxSaveFileNamePreset_SelectionChanged">
                            <ComboBoxItem Content="{x:Static props:AutomationStrings.Automation_SaveFileName_Timestamp}" Tag="{}{datetime}"/>
                            <ComboBoxItem Content="{x:Static props:AutomationStrings.Automation_SaveFileName_Date}" Tag="{}{date}"/>
                            <ComboBoxItem Content="{x:Static props:AutomationStrings.Automation_SaveFileName_DateTime}" Tag="{}{date}_{time}"/>
                            <ComboBoxItem Content="{x:Static props:AutomationStrings.Automation_SaveFileName_DateMode}" Tag="{}{date}_{mode}"/>
                            <ComboBoxItem Content="{x:Static props:AutomationStrings.Automation_SaveFileName_DateModePage}" Tag="{}{date}_{mode}_Page-{page}"/>
                            <ComboBoxItem Content="{x:Static props:AutomationStrings.Automation_SaveFileName_DateModePageCount}" Tag="{}{date}_{mode}_Page-{page}_Strokes-{count}"/>
                            <ComboBoxItem Content="{x:Static props:AutomationStrings.Automation_SaveFileName_Custom}" Tag="__custom__"/>
                        </ComboBox>
                        <ui:SettingsExpander.Items>
                            <ui:SettingsCard x:Name="CardCustomSaveFileNameTemplate"
                                             Header="{x:Static props:AutomationStrings.Automation_SaveFileName_CustomTemplate_Header}"
                                             Description="{x:Static props:AutomationStrings.Automation_SaveFileName_CustomTemplate_Desc}"
                                             Visibility="Collapsed">
                                <TextBox x:Name="TextBoxCustomSaveFileNameTemplate"
                                         MinWidth="260"
                                         LostFocus="TextBoxCustomSaveFileNameTemplate_LostFocus"/>
                            </ui:SettingsCard>
                        </ui:SettingsExpander.Items>
                    </ui:SettingsExpander>

                    <TextBlock Text="{x:Static props:AutomationStrings.FloatingInterceptor_Title}" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>

                    <ui:SettingsExpander Header="{x:Static props:AutomationStrings.FloatingInterceptor_Group_Seewo}"
                            IsExpanded="True">
                        <ui:SettingsExpander.HeaderIcon>
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Edit}"/>
                        </ui:SettingsExpander.HeaderIcon>
                        <ui:SettingsExpander.Items>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.AutoFold_App_SeewoBoard3}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/EasiNote3.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="ToggleSwitchSeewoWhiteboard3Floating" Toggled="ToggleSwitchSeewoWhiteboard3Floating_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.AutoFold_App_SeewoBoard5}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/EasiNote.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="ToggleSwitchSeewoWhiteboard5Floating" Toggled="ToggleSwitchSeewoWhiteboard5Floating_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.FloatingInterceptor_App_SeewoBoard5C}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/EasiNote5C.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="ToggleSwitchSeewoWhiteboard5CFloating" Toggled="ToggleSwitchSeewoWhiteboard5CFloating_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.FloatingInterceptor_App_SeewoPinco}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/SeewoPinco.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="ToggleSwitchSeewoPincoSideBarFloating" Toggled="ToggleSwitchSeewoPincoSideBarFloating_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.FloatingInterceptor_App_SeewoPincoDrawing}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/SeewoPinco.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="ToggleSwitchSeewoPincoDrawingFloating" Toggled="ToggleSwitchSeewoPincoDrawingFloating_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.FloatingInterceptor_App_SeewoPPTTools}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/PPTTools.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="ToggleSwitchSeewoPPTFloating" Toggled="ToggleSwitchSeewoPPTFloating_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.FloatingInterceptor_App_SeewoDesktopAnnotation}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/SeewoPinco.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="ToggleSwitchSeewoDesktopAnnotationFloating" Toggled="ToggleSwitchSeewoDesktopAnnotationFloating_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.FloatingInterceptor_App_SeewoDesktopSideBar}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/SeewoPinco.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="ToggleSwitchSeewoDesktopSideBarFloating" Toggled="ToggleSwitchSeewoDesktopSideBarFloating_Toggled"/>
                            </ui:SettingsCard>
                        </ui:SettingsExpander.Items>
                    </ui:SettingsExpander>

                    <ui:SettingsExpander Header="{x:Static props:NotificationStrings.Type_Other}"
                            IsExpanded="True">
                        <ui:SettingsExpander.HeaderIcon>
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Edit}"/>
                        </ui:SettingsExpander.HeaderIcon>
                        <ui:SettingsExpander.Items>
                            <ui:SettingsCard Header="AiClass">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/AiClass.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="ToggleSwitchAiClassFloating" Toggled="ToggleSwitchAiClassFloating_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.FloatingInterceptor_App_HiteAnnotation}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/HiteAnnotation.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="ToggleSwitchHiteAnnotationFloating" Toggled="ToggleSwitchHiteAnnotationFloating_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.FloatingInterceptor_App_ChangYanClass}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/畅言智慧课堂.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="ToggleSwitchChangYanFloating" Toggled="ToggleSwitchChangYanFloating_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.FloatingInterceptor_App_ChangYanPPT}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/畅言智慧课堂.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="ToggleSwitchChangYanPPTFloating" Toggled="ToggleSwitchChangYanPPTFloating_Toggled"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.FloatingInterceptor_App_IntelligentClass}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:ImageIcon Source="/Resources/Icons-png/天喻教育云.png"/>
                                </ui:SettingsCard.HeaderIcon>
                                <ui:ToggleSwitch x:Name="ToggleSwitchIntelligentClassFloating" Toggled="ToggleSwitchIntelligentClassFloating_Toggled"/>
                            </ui:SettingsCard>
                        </ui:SettingsExpander.Items>
                    </ui:SettingsExpander>

                    <TextBlock Text="{x:Static props:SecurityStrings.FileAssoc_Title}" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>

                    <ui:SettingsExpander Header="{x:Static props:SecurityStrings.FileAssoc_Check}"
                                         Description="{x:Static props:AutomationStrings.FileAssoc_CheckDesc}"
                                         IsExpanded="True">
                        <ui:SettingsExpander.HeaderIcon>
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Link}"/>
                        </ui:SettingsExpander.HeaderIcon>
                        <ui:SettingsExpander.Content>
                            <ikw:SimpleStackPanel Orientation="Horizontal"
                                                  Spacing="8"
                                                  VerticalAlignment="Center">
                                <TextBlock x:Name="TextBlockFileAssociationStatus"
                                           Text="{x:Static props:AutomationStrings.FileAssoc_NotChecked}"
                                           VerticalAlignment="Center"
                                           FontWeight="SemiBold"/>
                                <Button x:Name="BtnCheckFileAssociation"
                                        Content="{x:Static props:SecurityStrings.FileAssoc_Check}"
                                        Click="BtnCheckFileAssociation_Click"/>
                            </ikw:SimpleStackPanel>
                        </ui:SettingsExpander.Content>
                        <ui:SettingsExpander.Items>
                            <ui:SettingsCard Header="{x:Static props:AutomationStrings.FileAssoc_RegisterHeader}"
                                             Description="{x:Static props:AutomationStrings.FileAssoc_RegisterDesc}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Add}"/>
                                </ui:SettingsCard.HeaderIcon>
                                <Button x:Name="BtnRegisterFileAssociation"
                                        Content="{x:Static props:AutomationStrings.FileAssoc_RegisterHeader}"
                                        Click="BtnRegisterFileAssociation_Click"/>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:SecurityStrings.FileAssoc_Unregister}"
                                             Description="{x:Static props:AutomationStrings.FileAssoc_UnregisterDesc}">
                                <ui:SettingsCard.HeaderIcon>
                                    <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Cancel}"/>
                                </ui:SettingsCard.HeaderIcon>
                                <Button x:Name="BtnUnregisterFileAssociation"
                                        Content="{x:Static props:SecurityStrings.FileAssoc_Unregister}"
                                        Click="BtnUnregisterFileAssociation_Click"/>
                            </ui:SettingsCard>
                        </ui:SettingsExpander.Items>
                    </ui:SettingsExpander>

                    <!-- 自定义自动化入口 -->
                    <TextBlock Text="自定义自动化" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>

                    <ui:SettingsCard Header="自定义自动化规则"
                            Description="创建自定义的触发器→条件→行动规则，实现灵活的自动化操作。"
                            IsClickEnabled="True"
                            Click="CardCustomAutomation_Click">
                        <ui:SettingsCard.HeaderIcon>
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Page}"/>
                        </ui:SettingsCard.HeaderIcon>
                        <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.ChevronRight}" FontSize="12" Opacity="0.5" />
                    </ui:SettingsCard>

                    <Rectangle Height="48" />
                </ikw:SimpleStackPanel>
            </Grid>
        </Grid>
    </ScrollViewer>
</ui:Page>
