fix:issue #175 简易实现(后续会改)
This commit is contained in:
@@ -2600,6 +2600,15 @@
|
||||
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
|
||||
Toggled="ToggleSwitchAutoFoldInPPTSlideShow_Toggled" />
|
||||
</ui:SimpleStackPanel>
|
||||
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Foreground="#fafafa" Text="软件退出后保持收纳模式"
|
||||
VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" />
|
||||
<ui:ToggleSwitch OnContent="" OffContent=""
|
||||
Name="ToggleSwitchKeepFoldAfterSoftwareExit"
|
||||
IsOn="False" FontFamily="Microsoft YaHei UI" FontWeight="Bold"
|
||||
Toggled="ToggleSwitchKeepFoldAfterSoftwareExit_Toggled" />
|
||||
</ui:SimpleStackPanel>
|
||||
<TextBlock Text="# 开启后,执行自动收纳的软件在软件退出后不退出收纳模式,保持收纳状态" TextWrapping="Wrap" Foreground="#a1a1aa" />
|
||||
<Line HorizontalAlignment="Center" X1="0" Y1="0" X2="400" Y2="0" Stroke="#3f3f46"
|
||||
StrokeThickness="1" Margin="0,4,0,4" />
|
||||
<TextBlock Margin="0,0,0,8" Text="自动查杀" FontWeight="Bold" Foreground="#fafafa"
|
||||
|
||||
@@ -2966,6 +2966,13 @@ namespace Ink_Canvas
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchKeepFoldAfterSoftwareExit_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
Settings.Automation.KeepFoldAfterSoftwareExit = ToggleSwitchKeepFoldAfterSoftwareExit.IsOn;
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAlwaysGoToFirstPageOnReenter_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
|
||||
@@ -856,6 +856,8 @@ namespace Ink_Canvas
|
||||
|
||||
ToggleSwitchAutoFoldAfterPPTSlideShow.IsOn = Settings.Automation.IsAutoFoldAfterPPTSlideShow;
|
||||
|
||||
ToggleSwitchKeepFoldAfterSoftwareExit.IsOn = Settings.Automation.KeepFoldAfterSoftwareExit;
|
||||
|
||||
if (Settings.Automation.IsAutoKillEasiNote || Settings.Automation.IsAutoKillPptService ||
|
||||
Settings.Automation.IsAutoKillHiteAnnotation || Settings.Automation.IsAutoKillInkCanvas
|
||||
|| Settings.Automation.IsAutoKillICA || Settings.Automation.IsAutoKillIDT ||
|
||||
|
||||
@@ -578,8 +578,18 @@ namespace Ink_Canvas
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isFloatingBarFolded && !foldFloatingBarByUser) UnFoldFloatingBar_MouseUp(new object(), null);
|
||||
unfoldFloatingBarByUser = false;
|
||||
// 检查是否启用了软件退出后保持收纳模式
|
||||
if (Settings.Automation.KeepFoldAfterSoftwareExit)
|
||||
{
|
||||
// 如果启用了保持收纳模式,则不自动展开浮动栏
|
||||
unfoldFloatingBarByUser = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 原有的逻辑:软件退出后自动展开浮动栏
|
||||
if (isFloatingBarFolded && !foldFloatingBarByUser) UnFoldFloatingBar_MouseUp(new object(), null);
|
||||
unfoldFloatingBarByUser = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
|
||||
@@ -448,6 +448,9 @@ namespace Ink_Canvas
|
||||
[JsonProperty("autoDelSavedFilesDaysThreshold")]
|
||||
public int AutoDelSavedFilesDaysThreshold = 15;
|
||||
|
||||
[JsonProperty("keepFoldAfterSoftwareExit")]
|
||||
public bool KeepFoldAfterSoftwareExit { get; set; } = false;
|
||||
|
||||
[JsonProperty("isSaveFullPageStrokes")]
|
||||
public bool IsSaveFullPageStrokes;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user