1
This commit is contained in:
+1
-1579
File diff suppressed because it is too large
Load Diff
@@ -61,7 +61,7 @@ namespace Ink_Canvas
|
||||
private InkFadeManager _inkFadeManager;
|
||||
|
||||
// 悬浮窗拦截管理器
|
||||
private FloatingWindowInterceptorManager _floatingWindowInterceptorManager;
|
||||
public FloatingWindowInterceptorManager _floatingWindowInterceptorManager;
|
||||
|
||||
// 窗口概览模型
|
||||
private WindowOverviewModel _windowOverviewModel;
|
||||
@@ -1172,6 +1172,16 @@ namespace Ink_Canvas
|
||||
_inkSmoothingManager?.UpdateConfig();
|
||||
}
|
||||
|
||||
public void UpdateInkFadeManager(bool isEnabled, int fadeTime = 0)
|
||||
{
|
||||
if (_inkFadeManager != null)
|
||||
{
|
||||
_inkFadeManager.IsEnabled = isEnabled;
|
||||
if (fadeTime > 0)
|
||||
_inkFadeManager.UpdateFadeTime(fadeTime);
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdatePickNameBackgroundsInComboBox()
|
||||
{
|
||||
}
|
||||
@@ -2425,8 +2435,13 @@ namespace Ink_Canvas
|
||||
return;
|
||||
}
|
||||
case "ppt":
|
||||
targetGroupBox = GroupBoxPPT;
|
||||
break;
|
||||
{
|
||||
var sw = new Windows.SettingsViews.SettingsWindow();
|
||||
sw.Owner = this;
|
||||
sw.NavigateToPage("PowerPointPage");
|
||||
sw.ShowDialog();
|
||||
return;
|
||||
}
|
||||
case "advanced":
|
||||
{
|
||||
var sw = new Windows.SettingsViews.SettingsWindow();
|
||||
@@ -2436,8 +2451,13 @@ namespace Ink_Canvas
|
||||
return;
|
||||
}
|
||||
case "automation":
|
||||
targetGroupBox = GroupBoxAutomation;
|
||||
break;
|
||||
{
|
||||
var sw = new Windows.SettingsViews.SettingsWindow();
|
||||
sw.Owner = this;
|
||||
sw.NavigateToPage("AutomationPage");
|
||||
sw.ShowDialog();
|
||||
return;
|
||||
}
|
||||
case "randomwindow":
|
||||
{
|
||||
var sw = new Windows.SettingsViews.SettingsWindow();
|
||||
@@ -3231,18 +3251,18 @@ namespace Ink_Canvas
|
||||
try
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
if (ComboBoxPPTTimeCapsulePosition != null)
|
||||
var comboBox = sender as System.Windows.Controls.ComboBox;
|
||||
if (comboBox != null)
|
||||
{
|
||||
Settings.PowerPointSettings.PPTTimeCapsulePosition = ComboBoxPPTTimeCapsulePosition.SelectedIndex;
|
||||
Settings.PowerPointSettings.PPTTimeCapsulePosition = comboBox.SelectedIndex;
|
||||
SaveSettingsToFile();
|
||||
|
||||
// 如果当前在PPT放映模式,需要立即更新时间胶囊的位置
|
||||
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
|
||||
{
|
||||
UpdatePPTTimeCapsulePosition();
|
||||
}
|
||||
|
||||
LogHelper.WriteLogToFile($"PPT时间胶囊位置已更改为: {ComboBoxPPTTimeCapsulePosition.SelectedIndex}", LogHelper.LogType.Event);
|
||||
LogHelper.WriteLogToFile($"PPT时间胶囊位置已更改为: {comboBox.SelectedIndex}", LogHelper.LogType.Event);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -3254,7 +3274,7 @@ namespace Ink_Canvas
|
||||
/// <summary>
|
||||
/// 更新PPT模式下手势按钮的显示状态
|
||||
/// </summary>
|
||||
private void UpdateGestureButtonVisibilityInPPTMode()
|
||||
public void UpdateGestureButtonVisibilityInPPTMode()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -3333,7 +3353,7 @@ namespace Ink_Canvas
|
||||
/// <summary>
|
||||
/// 更新PPT时间胶囊的位置
|
||||
/// </summary>
|
||||
private void UpdatePPTTimeCapsulePosition()
|
||||
public void UpdatePPTTimeCapsulePosition()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -3372,26 +3392,6 @@ namespace Ink_Canvas
|
||||
/// </summary>
|
||||
private void InitializeFileAssociationStatus()
|
||||
{
|
||||
try
|
||||
{
|
||||
bool isRegistered = FileAssociationManager.IsFileAssociationRegistered();
|
||||
if (isRegistered)
|
||||
{
|
||||
TextBlockFileAssociationStatus.Text = "✓ .icstk文件关联已注册";
|
||||
TextBlockFileAssociationStatus.Foreground = new SolidColorBrush(Colors.LightGreen);
|
||||
}
|
||||
else
|
||||
{
|
||||
TextBlockFileAssociationStatus.Text = "✗ .icstk文件关联未注册";
|
||||
TextBlockFileAssociationStatus.Foreground = new SolidColorBrush(Colors.LightCoral);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TextBlockFileAssociationStatus.Text = "✗ 检查文件关联状态时出错";
|
||||
TextBlockFileAssociationStatus.Foreground = new SolidColorBrush(Colors.LightCoral);
|
||||
LogHelper.WriteLogToFile($"初始化文件关联状态显示时出错: {ex.Message}", LogHelper.LogType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -3492,15 +3492,6 @@ namespace Ink_Canvas
|
||||
// 获取所有滑块控件并添加触摸支持
|
||||
var sliders = new List<Slider>
|
||||
{
|
||||
PPTButtonLeftPositionValueSlider,
|
||||
PPTButtonRightPositionValueSlider,
|
||||
PPTButtonLBPositionValueSlider,
|
||||
PPTButtonRBPositionValueSlider,
|
||||
PPTLSButtonOpacityValueSlider,
|
||||
PPTRSButtonOpacityValueSlider,
|
||||
PPTLBButtonOpacityValueSlider,
|
||||
PPTRBButtonOpacityValueSlider,
|
||||
SideControlMinimumAutomationSlider,
|
||||
BoardInkWidthSlider,
|
||||
BoardInkAlphaSlider,
|
||||
BoardHighlighterWidthSlider,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Ink_Canvas.Helpers;
|
||||
using iNKORE.UI.WPF.Modern.Controls;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
@@ -10,25 +9,14 @@ namespace Ink_Canvas
|
||||
{
|
||||
#region 悬浮窗拦截功能
|
||||
|
||||
/// <summary>
|
||||
/// 初始化悬浮窗拦截管理器
|
||||
/// </summary>
|
||||
private void InitializeFloatingWindowInterceptor()
|
||||
{
|
||||
try
|
||||
{
|
||||
_floatingWindowInterceptorManager = new FloatingWindowInterceptorManager();
|
||||
|
||||
// 订阅事件
|
||||
_floatingWindowInterceptorManager.WindowIntercepted += OnFloatingWindowIntercepted;
|
||||
_floatingWindowInterceptorManager.WindowRestored += OnFloatingWindowRestored;
|
||||
|
||||
// 初始化拦截器
|
||||
_floatingWindowInterceptorManager.Initialize(Settings.Automation.FloatingWindowInterceptor);
|
||||
|
||||
// 加载UI状态
|
||||
LoadFloatingWindowInterceptorUI();
|
||||
|
||||
LogHelper.WriteLogToFile("悬浮窗拦截管理器初始化完成", LogHelper.LogType.Event);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -37,83 +25,11 @@ namespace Ink_Canvas
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载悬浮窗拦截UI状态
|
||||
/// </summary>
|
||||
private void LoadFloatingWindowInterceptorUI()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
|
||||
// 设置主开关状态
|
||||
ToggleSwitchFloatingWindowInterceptorEnabled.IsOn = Settings.Automation.FloatingWindowInterceptor.IsEnabled;
|
||||
|
||||
// 设置各个拦截规则的状态
|
||||
foreach (var kvp in Settings.Automation.FloatingWindowInterceptor.InterceptRules)
|
||||
{
|
||||
var toggleName = $"ToggleSwitch{kvp.Key}";
|
||||
var toggle = FindName(toggleName) as ToggleSwitch;
|
||||
if (toggle != null)
|
||||
{
|
||||
toggle.IsOn = kvp.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// 更新UI可见性
|
||||
UpdateFloatingWindowInterceptorUI();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogToFile($"加载悬浮窗拦截UI状态失败: {ex.Message}", LogHelper.LogType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新悬浮窗拦截UI
|
||||
/// </summary>
|
||||
private void UpdateFloatingWindowInterceptorUI()
|
||||
{
|
||||
try
|
||||
{
|
||||
var isEnabled = Settings.Automation.FloatingWindowInterceptor.IsEnabled;
|
||||
FloatingWindowInterceptorGrid.Visibility = isEnabled ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
// 计算启用的规则数量
|
||||
var enabledRulesCount = Settings.Automation.FloatingWindowInterceptor.InterceptRules.Where(kvp => kvp.Value).Count();
|
||||
var totalRulesCount = Settings.Automation.FloatingWindowInterceptor.InterceptRules.Count;
|
||||
|
||||
// 更新状态文本
|
||||
if (_floatingWindowInterceptorManager != null)
|
||||
{
|
||||
var stats = _floatingWindowInterceptorManager.GetStatistics();
|
||||
TextBlockFloatingWindowInterceptorStatus.Text = stats.IsRunning
|
||||
? $"拦截器运行中 - 已启用 {enabledRulesCount}/{totalRulesCount} 个规则"
|
||||
: $"拦截器未启动 - 已启用 {enabledRulesCount}/{totalRulesCount} 个规则";
|
||||
}
|
||||
else
|
||||
{
|
||||
TextBlockFloatingWindowInterceptorStatus.Text = $"拦截器未初始化 - 已启用 {enabledRulesCount}/{totalRulesCount} 个规则";
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogToFile($"更新悬浮窗拦截UI失败: {ex.Message}", LogHelper.LogType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 窗口被拦截事件处理
|
||||
/// </summary>
|
||||
private void OnFloatingWindowIntercepted(object sender, FloatingWindowInterceptor.WindowInterceptedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 在UI线程中更新状态
|
||||
Dispatcher.BeginInvoke(new Action(() =>
|
||||
{
|
||||
UpdateFloatingWindowInterceptorUI();
|
||||
}));
|
||||
Dispatcher.BeginInvoke(new Action(() => { }));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -121,18 +37,11 @@ namespace Ink_Canvas
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 窗口被恢复事件处理
|
||||
/// </summary>
|
||||
private void OnFloatingWindowRestored(object sender, FloatingWindowInterceptor.WindowRestoredEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 在UI线程中更新状态
|
||||
Dispatcher.BeginInvoke(new Action(() =>
|
||||
{
|
||||
UpdateFloatingWindowInterceptorUI();
|
||||
}));
|
||||
Dispatcher.BeginInvoke(new Action(() => { }));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -144,30 +53,24 @@ namespace Ink_Canvas
|
||||
|
||||
#region 悬浮窗拦截事件处理
|
||||
|
||||
/// <summary>
|
||||
/// 主开关切换事件
|
||||
/// </summary>
|
||||
private void ToggleSwitchFloatingWindowInterceptorEnabled_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
|
||||
try
|
||||
{
|
||||
Settings.Automation.FloatingWindowInterceptor.IsEnabled = ToggleSwitchFloatingWindowInterceptorEnabled.IsOn;
|
||||
var toggle = sender as iNKORE.UI.WPF.Modern.Controls.ToggleSwitch;
|
||||
if (toggle != null)
|
||||
Settings.Automation.FloatingWindowInterceptor.IsEnabled = toggle.IsOn;
|
||||
|
||||
if (_floatingWindowInterceptorManager != null)
|
||||
{
|
||||
if (Settings.Automation.FloatingWindowInterceptor.IsEnabled)
|
||||
{
|
||||
_floatingWindowInterceptorManager.Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
_floatingWindowInterceptorManager.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
UpdateFloatingWindowInterceptorUI();
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -176,129 +79,98 @@ namespace Ink_Canvas
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 希沃白板3拦截开关
|
||||
/// </summary>
|
||||
private void ToggleSwitchSeewoWhiteboard3Floating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoWhiteboard3Floating, ToggleSwitchSeewoWhiteboard3Floating.IsOn);
|
||||
var toggle = sender as iNKORE.UI.WPF.Modern.Controls.ToggleSwitch;
|
||||
if (toggle != null) SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoWhiteboard3Floating, toggle.IsOn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 希沃白板5拦截开关
|
||||
/// </summary>
|
||||
private void ToggleSwitchSeewoWhiteboard5Floating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoWhiteboard5Floating, ToggleSwitchSeewoWhiteboard5Floating.IsOn);
|
||||
var toggle = sender as iNKORE.UI.WPF.Modern.Controls.ToggleSwitch;
|
||||
if (toggle != null) SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoWhiteboard5Floating, toggle.IsOn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 希沃白板5C拦截开关
|
||||
/// </summary>
|
||||
private void ToggleSwitchSeewoWhiteboard5CFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoWhiteboard5CFloating, ToggleSwitchSeewoWhiteboard5CFloating.IsOn);
|
||||
var toggle = sender as iNKORE.UI.WPF.Modern.Controls.ToggleSwitch;
|
||||
if (toggle != null) SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoWhiteboard5CFloating, toggle.IsOn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 希沃品课侧栏拦截开关
|
||||
/// </summary>
|
||||
private void ToggleSwitchSeewoPincoSideBarFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoPincoSideBarFloating, ToggleSwitchSeewoPincoSideBarFloating.IsOn);
|
||||
var toggle = sender as iNKORE.UI.WPF.Modern.Controls.ToggleSwitch;
|
||||
if (toggle != null) SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoPincoSideBarFloating, toggle.IsOn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 希沃品课画笔拦截开关
|
||||
/// </summary>
|
||||
private void ToggleSwitchSeewoPincoDrawingFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoPincoDrawingFloating, ToggleSwitchSeewoPincoDrawingFloating.IsOn);
|
||||
var toggle = sender as iNKORE.UI.WPF.Modern.Controls.ToggleSwitch;
|
||||
if (toggle != null) SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoPincoDrawingFloating, toggle.IsOn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 希沃PPT小工具拦截开关
|
||||
/// </summary>
|
||||
private void ToggleSwitchSeewoPPTFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoPPTFloating, ToggleSwitchSeewoPPTFloating.IsOn);
|
||||
var toggle = sender as iNKORE.UI.WPF.Modern.Controls.ToggleSwitch;
|
||||
if (toggle != null) SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoPPTFloating, toggle.IsOn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// AiClass拦截开关
|
||||
/// </summary>
|
||||
private void ToggleSwitchAiClassFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
SetInterceptRule(FloatingWindowInterceptor.InterceptType.AiClassFloating, ToggleSwitchAiClassFloating.IsOn);
|
||||
var toggle = sender as iNKORE.UI.WPF.Modern.Controls.ToggleSwitch;
|
||||
if (toggle != null) SetInterceptRule(FloatingWindowInterceptor.InterceptType.AiClassFloating, toggle.IsOn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 鸿合屏幕书写拦截开关
|
||||
/// </summary>
|
||||
private void ToggleSwitchHiteAnnotationFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
SetInterceptRule(FloatingWindowInterceptor.InterceptType.HiteAnnotationFloating, ToggleSwitchHiteAnnotationFloating.IsOn);
|
||||
var toggle = sender as iNKORE.UI.WPF.Modern.Controls.ToggleSwitch;
|
||||
if (toggle != null) SetInterceptRule(FloatingWindowInterceptor.InterceptType.HiteAnnotationFloating, toggle.IsOn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 畅言智慧课堂拦截开关
|
||||
/// </summary>
|
||||
private void ToggleSwitchChangYanFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
SetInterceptRule(FloatingWindowInterceptor.InterceptType.ChangYanFloating, ToggleSwitchChangYanFloating.IsOn);
|
||||
var toggle = sender as iNKORE.UI.WPF.Modern.Controls.ToggleSwitch;
|
||||
if (toggle != null) SetInterceptRule(FloatingWindowInterceptor.InterceptType.ChangYanFloating, toggle.IsOn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 畅言PPT拦截开关
|
||||
/// </summary>
|
||||
private void ToggleSwitchChangYanPptFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
SetInterceptRule(FloatingWindowInterceptor.InterceptType.ChangYanPptFloating, ToggleSwitchChangYanPptFloating.IsOn);
|
||||
var toggle = sender as iNKORE.UI.WPF.Modern.Controls.ToggleSwitch;
|
||||
if (toggle != null) SetInterceptRule(FloatingWindowInterceptor.InterceptType.ChangYanPptFloating, toggle.IsOn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 天喻教育云拦截开关
|
||||
/// </summary>
|
||||
private void ToggleSwitchIntelligentClassFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
SetInterceptRule(FloatingWindowInterceptor.InterceptType.IntelligentClassFloating, ToggleSwitchIntelligentClassFloating.IsOn);
|
||||
var toggle = sender as iNKORE.UI.WPF.Modern.Controls.ToggleSwitch;
|
||||
if (toggle != null) SetInterceptRule(FloatingWindowInterceptor.InterceptType.IntelligentClassFloating, toggle.IsOn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 希沃桌面画笔拦截开关
|
||||
/// </summary>
|
||||
private void ToggleSwitchSeewoDesktopAnnotationFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoDesktopAnnotationFloating, ToggleSwitchSeewoDesktopAnnotationFloating.IsOn);
|
||||
var toggle = sender as iNKORE.UI.WPF.Modern.Controls.ToggleSwitch;
|
||||
if (toggle != null) SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoDesktopAnnotationFloating, toggle.IsOn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 希沃桌面侧栏拦截开关
|
||||
/// </summary>
|
||||
private void ToggleSwitchSeewoDesktopSideBarFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoDesktopSideBarFloating, ToggleSwitchSeewoDesktopSideBarFloating.IsOn);
|
||||
var toggle = sender as iNKORE.UI.WPF.Modern.Controls.ToggleSwitch;
|
||||
if (toggle != null) SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoDesktopSideBarFloating, toggle.IsOn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置拦截规则
|
||||
/// </summary>
|
||||
/// <param name="type">拦截类型</param>
|
||||
/// <param name="enabled">是否启用拦截</param>
|
||||
private void SetInterceptRule(FloatingWindowInterceptor.InterceptType type, bool enabled)
|
||||
public void SetInterceptRule(FloatingWindowInterceptor.InterceptType type, bool enabled)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -307,18 +179,15 @@ namespace Ink_Canvas
|
||||
_floatingWindowInterceptorManager.SetInterceptRule(type, enabled);
|
||||
}
|
||||
|
||||
// 更新设置
|
||||
var ruleName = type.ToString();
|
||||
if (Settings.Automation.FloatingWindowInterceptor.InterceptRules.ContainsKey(ruleName))
|
||||
{
|
||||
Settings.Automation.FloatingWindowInterceptor.InterceptRules[ruleName] = enabled;
|
||||
}
|
||||
|
||||
// 获取规则信息以处理父子关系
|
||||
var rule = _floatingWindowInterceptorManager?.GetInterceptRule(type);
|
||||
if (rule != null)
|
||||
{
|
||||
// 如果是父规则,更新所有子规则的设置
|
||||
if (rule.ChildTypes.Count > 0)
|
||||
{
|
||||
foreach (var childType in rule.ChildTypes)
|
||||
@@ -330,7 +199,6 @@ namespace Ink_Canvas
|
||||
}
|
||||
}
|
||||
}
|
||||
// 如果是子规则,更新父规则的设置
|
||||
else if (rule.ParentType.HasValue)
|
||||
{
|
||||
var parentRule = _floatingWindowInterceptorManager?.GetInterceptRule(rule.ParentType.Value);
|
||||
@@ -345,9 +213,6 @@ namespace Ink_Canvas
|
||||
}
|
||||
}
|
||||
|
||||
// 更新UI显示
|
||||
UpdateFloatingWindowInterceptorUI();
|
||||
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -357,4 +222,4 @@ namespace Ink_Canvas
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,6 +205,7 @@ namespace Ink_Canvas
|
||||
/// 提供对内部PPT链接管理器的公共访问,用于外部代码与PowerPoint进行交互。
|
||||
/// </remarks>
|
||||
public IPPTLinkManager PPTManager => _pptManager;
|
||||
public PPTUIManager PPTUIManager => _pptUIManager;
|
||||
#endregion
|
||||
|
||||
#region PPT Manager Initialization
|
||||
@@ -214,7 +215,7 @@ namespace Ink_Canvas
|
||||
/// <remarks>
|
||||
/// 清理并释放现有的 PPT 管理器与 COM/Interop 状态,创建并配置新的 PPT 管理器(ROT 或 COM 实现,取决于设置)、单一的 PPT 墨迹管理器及其自动保存行为,以及 PPT UI 管理器与其显示/按钮位置选项。方法内部会订阅必要的 PPT 事件并记录初始化过程中的错误或警告。同时初始化长按页翻页定时器以支持长按翻页功能。
|
||||
/// </remarks>
|
||||
private void InitializePPTManagers()
|
||||
public void InitializePPTManagers()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -298,7 +299,7 @@ namespace Ink_Canvas
|
||||
/// <remarks>
|
||||
/// 只有当Settings.PowerPointSettings.PowerPointSupport为true时才会启动监控,并记录启动事件日志。
|
||||
/// </remarks>
|
||||
private void StartPPTMonitoring()
|
||||
public void StartPPTMonitoring()
|
||||
{
|
||||
if (Settings.PowerPointSettings.PowerPointSupport)
|
||||
{
|
||||
@@ -310,7 +311,7 @@ namespace Ink_Canvas
|
||||
/// <summary>
|
||||
/// 停止 PowerPoint 相关的监控:停止并清除用于延迟退出 PPT 模式的定时器,并停止 PPT 管理器的监控,同时记录事件日志。
|
||||
/// </summary>
|
||||
private void StopPPTMonitoring()
|
||||
public void StopPPTMonitoring()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -334,7 +335,7 @@ namespace Ink_Canvas
|
||||
/// <remarks>
|
||||
/// 仅在 PowerPoint 增强功能已启用且未使用 ROT 链接时生效;方法将创建 PowerPoint 应用(若不存在)并启动用于定期检查应用状态的定时器。
|
||||
/// </remarks>
|
||||
private void StartPowerPointProcessMonitoring()
|
||||
public void StartPowerPointProcessMonitoring()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -364,7 +365,7 @@ namespace Ink_Canvas
|
||||
/// <summary>
|
||||
/// 停止PowerPoint应用程序守护
|
||||
/// </summary>
|
||||
private void StopPowerPointProcessMonitoring()
|
||||
public void StopPowerPointProcessMonitoring()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -2021,14 +2022,14 @@ namespace Ink_Canvas
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
|
||||
Settings.PowerPointSettings.EnablePowerPointEnhancement = ToggleSwitchPowerPointEnhancement.IsOn;
|
||||
var toggle = sender as iNKORE.UI.WPF.Modern.Controls.ToggleSwitch;
|
||||
if (toggle != null)
|
||||
Settings.PowerPointSettings.EnablePowerPointEnhancement = toggle.IsOn;
|
||||
|
||||
if (Settings.PowerPointSettings.EnablePowerPointEnhancement)
|
||||
{
|
||||
Settings.PowerPointSettings.IsSupportWPS = false;
|
||||
ToggleSwitchSupportWPS.IsOn = false;
|
||||
|
||||
// 更新PPT管理器的WPS支持设置
|
||||
if (_pptManager != null)
|
||||
{
|
||||
_pptManager.IsSupportWPS = false;
|
||||
@@ -2037,7 +2038,6 @@ namespace Ink_Canvas
|
||||
|
||||
SaveSettingsToFile();
|
||||
|
||||
// 启动或停止PowerPoint进程守护
|
||||
if (Settings.PowerPointSettings.EnablePowerPointEnhancement)
|
||||
{
|
||||
StartPowerPointProcessMonitoring();
|
||||
@@ -2066,16 +2066,16 @@ namespace Ink_Canvas
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
|
||||
Settings.PowerPointSettings.IsSupportWPS = ToggleSwitchSupportWPS.IsOn;
|
||||
var toggle = sender as iNKORE.UI.WPF.Modern.Controls.ToggleSwitch;
|
||||
if (toggle != null)
|
||||
Settings.PowerPointSettings.IsSupportWPS = toggle.IsOn;
|
||||
|
||||
if (Settings.PowerPointSettings.IsSupportWPS)
|
||||
{
|
||||
if (!Settings.PowerPointSettings.PowerPointSupport)
|
||||
{
|
||||
Settings.PowerPointSettings.PowerPointSupport = true;
|
||||
ToggleSwitchSupportPowerPoint.IsOn = true;
|
||||
|
||||
// 启动PPT监控
|
||||
if (_pptManager == null)
|
||||
{
|
||||
InitializePPTManagers();
|
||||
@@ -2086,12 +2086,10 @@ namespace Ink_Canvas
|
||||
if (Settings.PowerPointSettings.EnablePowerPointEnhancement)
|
||||
{
|
||||
Settings.PowerPointSettings.EnablePowerPointEnhancement = false;
|
||||
ToggleSwitchPowerPointEnhancement.IsOn = false;
|
||||
StopPowerPointProcessMonitoring();
|
||||
}
|
||||
}
|
||||
|
||||
// 更新PPT管理器的WPS支持设置与翻页跳过动画设置
|
||||
if (_pptManager != null)
|
||||
{
|
||||
_pptManager.IsSupportWPS = Settings.PowerPointSettings.IsSupportWPS;
|
||||
@@ -2105,7 +2103,9 @@ namespace Ink_Canvas
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
|
||||
Settings.PowerPointSettings.SkipAnimationsWhenGoNext = ToggleSwitchSkipAnimationsWhenGoNext.IsOn;
|
||||
var toggle = sender as iNKORE.UI.WPF.Modern.Controls.ToggleSwitch;
|
||||
if (toggle != null)
|
||||
Settings.PowerPointSettings.SkipAnimationsWhenGoNext = toggle.IsOn;
|
||||
|
||||
if (_pptManager != null)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -342,181 +342,13 @@ namespace Ink_Canvas
|
||||
// PowerPointSettings
|
||||
if (Settings.PowerPointSettings != null)
|
||||
{
|
||||
|
||||
|
||||
if (Settings.PowerPointSettings.PowerPointSupport)
|
||||
{
|
||||
ToggleSwitchSupportPowerPoint.IsOn = true;
|
||||
// PPT监控将在Window_Loaded中启动
|
||||
}
|
||||
else
|
||||
{
|
||||
ToggleSwitchSupportPowerPoint.IsOn = false;
|
||||
// PPT监控将保持停止状态
|
||||
}
|
||||
|
||||
ToggleSwitchShowCanvasAtNewSlideShow.IsOn = Settings.PowerPointSettings.IsShowCanvasAtNewSlideShow;
|
||||
|
||||
if (ToggleSwitchUseRotPptLink != null)
|
||||
{
|
||||
ToggleSwitchUseRotPptLink.IsOn = Settings.PowerPointSettings.UseRotPptLink;
|
||||
}
|
||||
|
||||
ToggleSwitchEnableTwoFingerGestureInPresentationMode.IsOn =
|
||||
Settings.PowerPointSettings.IsEnableTwoFingerGestureInPresentationMode;
|
||||
|
||||
ToggleSwitchEnableFingerGestureSlideShowControl.IsOn =
|
||||
Settings.PowerPointSettings.IsEnableFingerGestureSlideShowControl;
|
||||
|
||||
ToggleSwitchAutoSaveStrokesInPowerPoint.IsOn =
|
||||
Settings.PowerPointSettings.IsAutoSaveStrokesInPowerPoint;
|
||||
|
||||
ToggleSwitchNotifyPreviousPage.IsOn = Settings.PowerPointSettings.IsNotifyPreviousPage;
|
||||
|
||||
// PPT时间显示胶囊设置
|
||||
if (ToggleSwitchEnablePPTTimeCapsule != null)
|
||||
{
|
||||
ToggleSwitchEnablePPTTimeCapsule.IsOn = Settings.PowerPointSettings.EnablePPTTimeCapsule;
|
||||
}
|
||||
if (ComboBoxPPTTimeCapsulePosition != null)
|
||||
{
|
||||
int position = Settings.PowerPointSettings.PPTTimeCapsulePosition;
|
||||
if (position < 0 || position > 2)
|
||||
{
|
||||
position = 1; // 默认右上角
|
||||
}
|
||||
ComboBoxPPTTimeCapsulePosition.SelectedIndex = position;
|
||||
}
|
||||
if (ToggleSwitchShowPPTSidebarByDefault != null)
|
||||
{
|
||||
ToggleSwitchShowPPTSidebarByDefault.IsOn = Settings.PowerPointSettings.ShowPPTSidebarByDefault;
|
||||
}
|
||||
|
||||
// -- new --
|
||||
ToggleSwitchShowPPTButton.IsOn = Settings.PowerPointSettings.ShowPPTButton;
|
||||
|
||||
ToggleSwitchEnablePPTButtonPageClickable.IsOn =
|
||||
Settings.PowerPointSettings.EnablePPTButtonPageClickable;
|
||||
|
||||
ToggleSwitchEnablePPTButtonLongPressPageTurn.IsOn =
|
||||
Settings.PowerPointSettings.EnablePPTButtonLongPressPageTurn;
|
||||
|
||||
var dops = Settings.PowerPointSettings.PPTButtonsDisplayOption.ToString();
|
||||
var dopsc = dops.ToCharArray();
|
||||
if ((dopsc[0] == '1' || dopsc[0] == '2') && (dopsc[1] == '1' || dopsc[1] == '2') &&
|
||||
(dopsc[2] == '1' || dopsc[2] == '2') && (dopsc[3] == '1' || dopsc[3] == '2'))
|
||||
{
|
||||
CheckboxEnableLBPPTButton.IsChecked = dopsc[0] == '2';
|
||||
CheckboxEnableRBPPTButton.IsChecked = dopsc[1] == '2';
|
||||
CheckboxEnableLSPPTButton.IsChecked = dopsc[2] == '2';
|
||||
CheckboxEnableRSPPTButton.IsChecked = dopsc[3] == '2';
|
||||
}
|
||||
else
|
||||
{
|
||||
Settings.PowerPointSettings.PPTButtonsDisplayOption = 2222;
|
||||
CheckboxEnableLBPPTButton.IsChecked = true;
|
||||
CheckboxEnableRBPPTButton.IsChecked = true;
|
||||
CheckboxEnableLSPPTButton.IsChecked = true;
|
||||
CheckboxEnableRSPPTButton.IsChecked = true;
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
|
||||
var sops = Settings.PowerPointSettings.PPTSButtonsOption.ToString();
|
||||
var sopsc = sops.ToCharArray();
|
||||
if ((sopsc[0] == '1' || sopsc[0] == '2') && (sopsc[1] == '1' || sopsc[1] == '2') &&
|
||||
(sopsc[2] == '1' || sopsc[2] == '2'))
|
||||
{
|
||||
CheckboxSPPTDisplayPage.IsChecked = sopsc[0] == '2';
|
||||
CheckboxSPPTHalfOpacity.IsChecked = sopsc[1] == '2';
|
||||
CheckboxSPPTBlackBackground.IsChecked = sopsc[2] == '2';
|
||||
}
|
||||
else
|
||||
{
|
||||
Settings.PowerPointSettings.PPTSButtonsOption = 221;
|
||||
CheckboxSPPTDisplayPage.IsChecked = true;
|
||||
CheckboxSPPTHalfOpacity.IsChecked = true;
|
||||
CheckboxSPPTBlackBackground.IsChecked = false;
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
|
||||
var bops = Settings.PowerPointSettings.PPTBButtonsOption.ToString();
|
||||
var bopsc = bops.ToCharArray();
|
||||
if ((bopsc[0] == '1' || bopsc[0] == '2') && (bopsc[1] == '1' || bopsc[1] == '2') &&
|
||||
(bopsc[2] == '1' || bopsc[2] == '2'))
|
||||
{
|
||||
CheckboxBPPTDisplayPage.IsChecked = bopsc[0] == '2';
|
||||
CheckboxBPPTHalfOpacity.IsChecked = bopsc[1] == '2';
|
||||
CheckboxBPPTBlackBackground.IsChecked = bopsc[2] == '2';
|
||||
}
|
||||
else
|
||||
{
|
||||
Settings.PowerPointSettings.PPTBButtonsOption = 121;
|
||||
CheckboxBPPTDisplayPage.IsChecked = false;
|
||||
CheckboxBPPTHalfOpacity.IsChecked = true;
|
||||
CheckboxBPPTBlackBackground.IsChecked = false;
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
|
||||
PPTButtonLeftPositionValueSlider.Value = Settings.PowerPointSettings.PPTLSButtonPosition;
|
||||
|
||||
PPTButtonRightPositionValueSlider.Value = Settings.PowerPointSettings.PPTRSButtonPosition;
|
||||
|
||||
PPTButtonLBPositionValueSlider.Value = Settings.PowerPointSettings.PPTLBButtonPosition;
|
||||
|
||||
PPTButtonRBPositionValueSlider.Value = Settings.PowerPointSettings.PPTRBButtonPosition;
|
||||
|
||||
// 初始化PPT翻页按钮透明度滑块值,根据半透明选项设置默认值
|
||||
// 重用之前定义的sopsc和bopsc变量
|
||||
bool isSideHalfOpacity = sopsc.Length >= 2 && sopsc[1] == '2';
|
||||
// 如果透明度为0或未设置,根据半透明选项设置默认值
|
||||
if (Settings.PowerPointSettings.PPTLSButtonOpacity == 0.0 ||
|
||||
(Settings.PowerPointSettings.PPTLSButtonOpacity == 1.0 && isSideHalfOpacity))
|
||||
{
|
||||
Settings.PowerPointSettings.PPTLSButtonOpacity = isSideHalfOpacity ? 0.5 : 1.0;
|
||||
}
|
||||
if (Settings.PowerPointSettings.PPTRSButtonOpacity == 0.0 ||
|
||||
(Settings.PowerPointSettings.PPTRSButtonOpacity == 1.0 && isSideHalfOpacity))
|
||||
{
|
||||
Settings.PowerPointSettings.PPTRSButtonOpacity = isSideHalfOpacity ? 0.5 : 1.0;
|
||||
}
|
||||
PPTLSButtonOpacityValueSlider.Value = Settings.PowerPointSettings.PPTLSButtonOpacity;
|
||||
PPTRSButtonOpacityValueSlider.Value = Settings.PowerPointSettings.PPTRSButtonOpacity;
|
||||
|
||||
bool isBottomHalfOpacity = bopsc.Length >= 2 && bopsc[1] == '2';
|
||||
// 如果透明度为0或未设置,根据半透明选项设置默认值
|
||||
if (Settings.PowerPointSettings.PPTLBButtonOpacity == 0.0 ||
|
||||
(Settings.PowerPointSettings.PPTLBButtonOpacity == 1.0 && isBottomHalfOpacity))
|
||||
{
|
||||
Settings.PowerPointSettings.PPTLBButtonOpacity = isBottomHalfOpacity ? 0.5 : 1.0;
|
||||
}
|
||||
if (Settings.PowerPointSettings.PPTRBButtonOpacity == 0.0 ||
|
||||
(Settings.PowerPointSettings.PPTRBButtonOpacity == 1.0 && isBottomHalfOpacity))
|
||||
{
|
||||
Settings.PowerPointSettings.PPTRBButtonOpacity = isBottomHalfOpacity ? 0.5 : 1.0;
|
||||
}
|
||||
PPTLBButtonOpacityValueSlider.Value = Settings.PowerPointSettings.PPTLBButtonOpacity;
|
||||
PPTRBButtonOpacityValueSlider.Value = Settings.PowerPointSettings.PPTRBButtonOpacity;
|
||||
|
||||
UpdatePPTBtnSlidersStatus();
|
||||
|
||||
UpdatePPTBtnPreview();
|
||||
|
||||
// -- new --
|
||||
|
||||
ToggleSwitchNotifyHiddenPage.IsOn = Settings.PowerPointSettings.IsNotifyHiddenPage;
|
||||
|
||||
ToggleSwitchNotifyAutoPlayPresentation.IsOn = Settings.PowerPointSettings.IsNotifyAutoPlayPresentation;
|
||||
|
||||
ToggleSwitchSupportWPS.IsOn = Settings.PowerPointSettings.IsSupportWPS;
|
||||
|
||||
ToggleSwitchSkipAnimationsWhenGoNext.IsOn = Settings.PowerPointSettings.SkipAnimationsWhenGoNext;
|
||||
|
||||
ToggleSwitchPowerPointEnhancement.IsOn = Settings.PowerPointSettings.EnablePowerPointEnhancement;
|
||||
|
||||
ToggleSwitchAutoSaveScreenShotInPowerPoint.IsOn =
|
||||
Settings.PowerPointSettings.IsAutoSaveScreenShotInPowerPoint;
|
||||
ToggleSwitchEnableWppProcessKill.IsOn = Settings.PowerPointSettings.EnableWppProcessKill;
|
||||
ToggleSwitchAlwaysGoToFirstPageOnReenter.IsOn = Settings.PowerPointSettings.IsAlwaysGoToFirstPageOnReenter;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -526,36 +358,17 @@ namespace Ink_Canvas
|
||||
// Gesture
|
||||
if (Settings.Gesture != null)
|
||||
{
|
||||
ToggleSwitchEnableMultiTouchMode.IsOn = Settings.Gesture.IsEnableMultiTouchMode;
|
||||
|
||||
ToggleSwitchEnableTwoFingerZoom.IsOn = Settings.Gesture.IsEnableTwoFingerZoom;
|
||||
BoardToggleSwitchEnableTwoFingerZoom.IsOn = Settings.Gesture.IsEnableTwoFingerZoom;
|
||||
|
||||
ToggleSwitchEnableTwoFingerTranslate.IsOn = Settings.Gesture.IsEnableTwoFingerTranslate;
|
||||
BoardToggleSwitchEnableTwoFingerTranslate.IsOn = Settings.Gesture.IsEnableTwoFingerTranslate;
|
||||
|
||||
ToggleSwitchEnableTwoFingerRotation.IsOn = Settings.Gesture.IsEnableTwoFingerRotation;
|
||||
BoardToggleSwitchEnableTwoFingerRotation.IsOn = Settings.Gesture.IsEnableTwoFingerRotation;
|
||||
|
||||
if (Settings.Gesture.AutoSwitchTwoFingerGesture)
|
||||
{
|
||||
if (Topmost)
|
||||
{
|
||||
ToggleSwitchEnableTwoFingerTranslate.IsOn = false;
|
||||
BoardToggleSwitchEnableTwoFingerTranslate.IsOn = false;
|
||||
Settings.Gesture.IsEnableTwoFingerTranslate = false;
|
||||
// if (!isInMultiTouchMode) ToggleSwitchEnableMultiTouchMode.IsOn = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ToggleSwitchEnableTwoFingerTranslate.IsOn = true;
|
||||
BoardToggleSwitchEnableTwoFingerTranslate.IsOn = true;
|
||||
Settings.Gesture.IsEnableTwoFingerTranslate = true;
|
||||
if (isInMultiTouchMode) ToggleSwitchEnableMultiTouchMode.IsOn = false;
|
||||
}
|
||||
}
|
||||
|
||||
CheckEnableTwoFingerGestureBtnColorPrompt();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -778,54 +591,6 @@ namespace Ink_Canvas
|
||||
if (Settings.Automation != null)
|
||||
{
|
||||
StartOrStoptimerCheckAutoFold();
|
||||
ToggleSwitchAutoFoldInEasiNote.IsOn = Settings.Automation.IsAutoFoldInEasiNote;
|
||||
|
||||
ToggleSwitchAutoFoldInEasiCamera.IsOn = Settings.Automation.IsAutoFoldInEasiCamera;
|
||||
|
||||
ToggleSwitchAutoFoldInEasiNote3C.IsOn = Settings.Automation.IsAutoFoldInEasiNote3C;
|
||||
|
||||
ToggleSwitchAutoFoldInEasiNote3.IsOn = Settings.Automation.IsAutoFoldInEasiNote3;
|
||||
|
||||
ToggleSwitchAutoFoldInEasiNote5C.IsOn = Settings.Automation.IsAutoFoldInEasiNote5C;
|
||||
|
||||
ToggleSwitchAutoFoldInSeewoPincoTeacher.IsOn = Settings.Automation.IsAutoFoldInSeewoPincoTeacher;
|
||||
|
||||
ToggleSwitchAutoFoldInHiteTouchPro.IsOn = Settings.Automation.IsAutoFoldInHiteTouchPro;
|
||||
|
||||
ToggleSwitchAutoFoldInHiteLightBoard.IsOn = Settings.Automation.IsAutoFoldInHiteLightBoard;
|
||||
|
||||
ToggleSwitchAutoFoldInHiteCamera.IsOn = Settings.Automation.IsAutoFoldInHiteCamera;
|
||||
|
||||
ToggleSwitchAutoFoldInWxBoardMain.IsOn = Settings.Automation.IsAutoFoldInWxBoardMain;
|
||||
|
||||
ToggleSwitchAutoFoldInOldZyBoard.IsOn = Settings.Automation.IsAutoFoldInOldZyBoard;
|
||||
|
||||
ToggleSwitchAutoFoldInMSWhiteboard.IsOn = Settings.Automation.IsAutoFoldInMSWhiteboard;
|
||||
|
||||
ToggleSwitchAutoFoldInAdmoxWhiteboard.IsOn = Settings.Automation.IsAutoFoldInAdmoxWhiteboard;
|
||||
|
||||
ToggleSwitchAutoFoldInAdmoxBooth.IsOn = Settings.Automation.IsAutoFoldInAdmoxBooth;
|
||||
|
||||
ToggleSwitchAutoFoldInQPoint.IsOn = Settings.Automation.IsAutoFoldInQPoint;
|
||||
|
||||
ToggleSwitchAutoFoldInYiYunVisualPresenter.IsOn = Settings.Automation.IsAutoFoldInYiYunVisualPresenter;
|
||||
|
||||
ToggleSwitchAutoFoldInMaxHubWhiteboard.IsOn = Settings.Automation.IsAutoFoldInMaxHubWhiteboard;
|
||||
|
||||
SettingsPPTInkingAndAutoFoldExplictBorder.Visibility = Visibility.Collapsed;
|
||||
if (Settings.Automation.IsAutoFoldInPPTSlideShow)
|
||||
{
|
||||
SettingsPPTInkingAndAutoFoldExplictBorder.Visibility = Visibility.Visible;
|
||||
SettingsShowCanvasAtNewSlideShowStackPanel.Opacity = 0.5;
|
||||
SettingsShowCanvasAtNewSlideShowStackPanel.IsHitTestVisible = false;
|
||||
}
|
||||
|
||||
|
||||
ToggleSwitchAutoFoldInPPTSlideShow.IsOn = Settings.Automation.IsAutoFoldInPPTSlideShow;
|
||||
|
||||
ToggleSwitchAutoFoldAfterPPTSlideShow.IsOn = Settings.Automation.IsAutoFoldAfterPPTSlideShow;
|
||||
|
||||
ToggleSwitchKeepFoldAfterSoftwareExit.IsOn = Settings.Automation.KeepFoldAfterSoftwareExit;
|
||||
|
||||
if (Settings.Automation.IsAutoKillEasiNote || Settings.Automation.IsAutoKillPptService ||
|
||||
Settings.Automation.IsAutoKillHiteAnnotation || Settings.Automation.IsAutoKillInkCanvas
|
||||
@@ -839,63 +604,6 @@ namespace Ink_Canvas
|
||||
{
|
||||
timerKillProcess.Stop();
|
||||
}
|
||||
|
||||
ToggleSwitchAutoKillEasiNote.IsOn = Settings.Automation.IsAutoKillEasiNote;
|
||||
|
||||
ToggleSwitchAutoKillHiteAnnotation.IsOn = Settings.Automation.IsAutoKillHiteAnnotation;
|
||||
|
||||
ToggleSwitchAutoKillPptService.IsOn = Settings.Automation.IsAutoKillPptService;
|
||||
|
||||
ToggleSwitchAutoKillVComYouJiao.IsOn = Settings.Automation.IsAutoKillVComYouJiao;
|
||||
|
||||
ToggleSwitchAutoKillInkCanvas.IsOn = Settings.Automation.IsAutoKillInkCanvas;
|
||||
|
||||
ToggleSwitchAutoKillICA.IsOn = Settings.Automation.IsAutoKillICA;
|
||||
|
||||
ToggleSwitchAutoKillIDT.IsOn = Settings.Automation.IsAutoKillIDT;
|
||||
|
||||
ToggleSwitchAutoKillSeewoLauncher2DesktopAnnotation.IsOn =
|
||||
Settings.Automation.IsAutoKillSeewoLauncher2DesktopAnnotation;
|
||||
|
||||
ToggleSwitchAutoSaveStrokesAtClear.IsOn = Settings.Automation.IsAutoSaveStrokesAtClear;
|
||||
|
||||
ToggleSwitchSaveScreenshotsInDateFolders.IsOn = Settings.Automation.IsSaveScreenshotsInDateFolders;
|
||||
|
||||
ToggleSwitchAutoSaveStrokesAtScreenshot.IsOn = Settings.Automation.IsAutoSaveStrokesAtScreenshot;
|
||||
|
||||
ToggleSwitchSaveFullPageStrokes.IsOn = Settings.Automation.IsSaveFullPageStrokes;
|
||||
|
||||
ToggleSwitchSaveStrokesAsXML.IsOn = Settings.Automation.IsSaveStrokesAsXML;
|
||||
|
||||
// 加载定时保存墨迹设置
|
||||
ToggleSwitchEnableAutoSaveStrokes.IsOn = Settings.Automation.IsEnableAutoSaveStrokes;
|
||||
// 初始化保存间隔下拉框
|
||||
if (ComboBoxAutoSaveStrokesInterval != null)
|
||||
{
|
||||
int intervalMinutes = Settings.Automation.AutoSaveStrokesIntervalMinutes;
|
||||
if (intervalMinutes < 1) intervalMinutes = 5; // 默认5分钟
|
||||
foreach (System.Windows.Controls.ComboBoxItem item in ComboBoxAutoSaveStrokesInterval.Items)
|
||||
{
|
||||
if (item.Tag != null && int.TryParse(item.Tag.ToString(), out int tagValue) && tagValue == intervalMinutes)
|
||||
{
|
||||
ComboBoxAutoSaveStrokesInterval.SelectedItem = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SideControlMinimumAutomationSlider.Value = Settings.Automation.MinimumAutomationStrokeNumber;
|
||||
|
||||
AutoSavedStrokesLocation.Text = Settings.Automation.AutoSavedStrokesLocation;
|
||||
ToggleSwitchAutoDelSavedFiles.IsOn = Settings.Automation.AutoDelSavedFiles;
|
||||
ComboBoxAutoDelSavedFilesDaysThreshold.Text =
|
||||
Settings.Automation.AutoDelSavedFilesDaysThreshold.ToString();
|
||||
|
||||
// 加载退出收纳模式自动切换至批注模式设置
|
||||
ToggleSwitchAutoEnterAnnotationModeWhenExitFoldMode.IsOn = Settings.Automation.IsAutoEnterAnnotationModeWhenExitFoldMode;
|
||||
|
||||
// 加载退出白板时自动收纳设置
|
||||
ToggleSwitchAutoFoldWhenExitWhiteboard.IsOn = Settings.Automation.IsAutoFoldWhenExitWhiteboard;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -82,6 +82,12 @@ namespace Ink_Canvas
|
||||
/// 进程终止定时器
|
||||
/// </summary>
|
||||
private Timer timerKillProcess = new Timer();
|
||||
|
||||
public void UpdateAutoKillProcessTimer(bool shouldRun)
|
||||
{
|
||||
if (shouldRun) timerKillProcess.Start();
|
||||
else timerKillProcess.Stop();
|
||||
}
|
||||
/// <summary>
|
||||
/// 统一的主窗口定时器
|
||||
/// </summary>
|
||||
@@ -294,7 +300,7 @@ namespace Ink_Canvas
|
||||
/// 如果启用,则根据Settings.Automation.AutoSaveStrokesIntervalMinutes设置定时器间隔
|
||||
/// 最小间隔为1分钟
|
||||
/// </remarks>
|
||||
private void UpdateAutoSaveStrokesTimer()
|
||||
public void UpdateAutoSaveStrokesTimer()
|
||||
{
|
||||
if (autoSaveStrokesTimer == null) return;
|
||||
|
||||
|
||||
@@ -122,13 +122,13 @@
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Pinned}" />
|
||||
</ui:SettingsCard.HeaderIcon>
|
||||
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
|
||||
<TextBlock Text="{Binding ElementName=ViewboxFloatingBarScaleTransformValueSlider, Path=Value}"
|
||||
VerticalAlignment="Center" FontFamily="Consolas"/>
|
||||
<Slider x:Name="ViewboxFloatingBarScaleTransformValueSlider" Minimum="0.5"
|
||||
Maximum="1.25" Width="168"
|
||||
IsSnapToTickEnabled="True" Value="1" TickFrequency="0.05"
|
||||
TickPlacement="None" AutoToolTipPlacement="None"
|
||||
ValueChanged="ViewboxFloatingBarScaleTransformValueSlider_ValueChanged" />
|
||||
<TextBlock Text="{Binding ElementName=ViewboxFloatingBarScaleTransformValueSlider, Path=Value}"
|
||||
VerticalAlignment="Center" FontFamily="Consolas" Width="40" />
|
||||
</ikw:SimpleStackPanel>
|
||||
</ui:SettingsCard>
|
||||
|
||||
@@ -137,13 +137,13 @@
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.EaseOfAccess}" />
|
||||
</ui:SettingsCard.HeaderIcon>
|
||||
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
|
||||
<TextBlock Text="{Binding ElementName=ViewboxFloatingBarOpacityValueSlider, Path=Value, StringFormat={}{0:F2}}"
|
||||
VerticalAlignment="Center" FontFamily="Consolas"/>
|
||||
<Slider x:Name="ViewboxFloatingBarOpacityValueSlider" Minimum="0.3"
|
||||
Maximum="1" Width="168"
|
||||
IsSnapToTickEnabled="True" Value="1" TickFrequency="0.05"
|
||||
TickPlacement="None" AutoToolTipPlacement="None"
|
||||
ValueChanged="ViewboxFloatingBarOpacityValueSlider_ValueChanged" />
|
||||
<TextBlock Text="{Binding ElementName=ViewboxFloatingBarOpacityValueSlider, Path=Value}"
|
||||
VerticalAlignment="Center" FontFamily="Consolas" Width="40" />
|
||||
</ikw:SimpleStackPanel>
|
||||
</ui:SettingsCard>
|
||||
|
||||
|
||||
@@ -106,6 +106,9 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||
ComboBoxEraserDisplayOption.SelectedIndex = settings.Appearance.EraserDisplayOption;
|
||||
|
||||
CardEnableTrayIcon.IsOn = settings.Appearance.EnableTrayIcon;
|
||||
|
||||
if (BtnHitokotoCustomize != null)
|
||||
BtnHitokotoCustomize.Visibility = settings.Appearance.ChickenSoupSource == 3 ? Visibility.Visible : Visibility.Collapsed;
|
||||
}
|
||||
|
||||
private MainWindow GetMainWindow() => Application.Current.MainWindow as MainWindow;
|
||||
@@ -232,6 +235,10 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||
{
|
||||
mw.ViewboxFloatingBarScaleTransform.ScaleX = val > 0.5 && val < 1.25 ? val : val <= 0.5 ? 0.5 : 1.25;
|
||||
mw.ViewboxFloatingBarScaleTransform.ScaleY = val > 0.5 && val < 1.25 ? val : val <= 0.5 ? 0.5 : 1.25;
|
||||
if (mw.BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
|
||||
mw.ViewboxFloatingBarMarginAnimation(60);
|
||||
else
|
||||
mw.ViewboxFloatingBarMarginAnimation(100, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,6 +256,11 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Appearance.ViewboxFloatingBarOpacityInPPTValue = ViewboxFloatingBarOpacityInPPTValueSlider.Value;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
var mw = GetMainWindow();
|
||||
if (mw != null && mw.currentMode == 2)
|
||||
{
|
||||
mw.ViewboxFloatingBar.Opacity = ViewboxFloatingBarOpacityInPPTValueSlider.Value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -0,0 +1,353 @@
|
||||
<ui:Page 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:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
|
||||
xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
mc:Ignorable="d"
|
||||
Title="自动化">
|
||||
|
||||
<ScrollViewer PanningMode="VerticalFirst">
|
||||
<Grid Margin="59,0,59,0">
|
||||
<FrameworkElement.Resources>
|
||||
<sys:Double x:Key="SettingsCardSpacing">4</sys:Double>
|
||||
<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="{i18n:I18n Key=AutoFold_Title}" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInEasiNote"
|
||||
Header="希沃白板"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoFoldInEasiNote_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInEasiNoteIgnoreDesktopAnno"
|
||||
Header="希沃白板 (忽略桌面批注)"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Clear}"
|
||||
Toggled="ToggleSwitchAutoFoldInEasiNoteIgnoreDesktopAnno_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInEasiCamera"
|
||||
Header="希沃视频展台"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Camera}"
|
||||
Toggled="ToggleSwitchAutoFoldInEasiCamera_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInEasiNote3"
|
||||
Header="EasiNote3"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoFoldInEasiNote3_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInEasiNote3C"
|
||||
Header="EasiNote3C"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoFoldInEasiNote3C_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInEasiNote5C"
|
||||
Header="EasiNote5C"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoFoldInEasiNote5C_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInSeewoPincoTeacher"
|
||||
Header="Seewo Pinco Teacher"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoFoldInSeewoPincoTeacher_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInHiteTouchPro"
|
||||
Header="鸿合 TouchPro"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoFoldInHiteTouchPro_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInHiteLightBoard"
|
||||
Header="鸿合 光能板"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoFoldInHiteLightBoard_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInHiteCamera"
|
||||
Header="鸿合 视频展台"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Camera}"
|
||||
Toggled="ToggleSwitchAutoFoldInHiteCamera_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInWxBoardMain"
|
||||
Header="小白板"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoFoldInWxBoardMain_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInOldZyBoard"
|
||||
Header="中银白板"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoFoldInOldZyBoard_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInMSWhiteboard"
|
||||
Header="Microsoft Whiteboard"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoFoldInMSWhiteboard_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInAdmoxWhiteboard"
|
||||
Header="Admox 白板"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoFoldInAdmoxWhiteboard_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInAdmoxBooth"
|
||||
Header="Admox 展台"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Camera}"
|
||||
Toggled="ToggleSwitchAutoFoldInAdmoxBooth_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInQPoint"
|
||||
Header="QPoint"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoFoldInQPoint_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInYiYunVisualPresenter"
|
||||
Header="易云展台"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Camera}"
|
||||
Toggled="ToggleSwitchAutoFoldInYiYunVisualPresenter_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInMaxHubWhiteboard"
|
||||
Header="MaxHub 白板"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoFoldInMaxHubWhiteboard_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldInPPTSlideShow"
|
||||
Header="PPT 放映"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoFoldInPPTSlideShow_Toggled"/>
|
||||
|
||||
<TextBlock Text="{i18n:I18n Key=AutoKill_Title}" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoKillPptService"
|
||||
Header="PPT 服务"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoKillPptService_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoKillEasiNote"
|
||||
Header="希沃白板"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoKillEasiNote_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoKillHiteAnnotation"
|
||||
Header="鸿合批注"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoKillHiteAnnotation_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoKillVComYouJiao"
|
||||
Header="VCom 幼教"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoKillVComYouJiao_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoKillSeewoLauncher2DesktopAnnotation"
|
||||
Header="希沃桌面批注"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoKillSeewoLauncher2DesktopAnnotation_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoKillInkCanvas"
|
||||
Header="InkCanvas"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoKillInkCanvas_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoKillICA"
|
||||
Header="ICA"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoKillICA_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoKillIDT"
|
||||
Header="IDT"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchAutoKillIDT_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoEnterAnnotationAfterKillHite"
|
||||
Header="杀进程后进入批注模式"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Edit}"
|
||||
Toggled="ToggleSwitchAutoEnterAnnotationAfterKillHite_Toggled"/>
|
||||
|
||||
<TextBlock Text="{i18n:I18n Key=AutoFold_Mode}" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoEnterAnnotationModeWhenExitFoldMode"
|
||||
Header="退出收纳时进入批注模式"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Edit}"
|
||||
Toggled="ToggleSwitchAutoEnterAnnotationModeWhenExitFoldMode_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldWhenExitWhiteboard"
|
||||
Header="退出白板时自动收纳"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Back}"
|
||||
Toggled="ToggleSwitchAutoFoldWhenExitWhiteboard_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoFoldAfterPPTSlideShow"
|
||||
Header="PPT 放映结束后自动收纳"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Back}"
|
||||
Toggled="ToggleSwitchAutoFoldAfterPPTSlideShow_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardKeepFoldAfterSoftwareExit"
|
||||
Header="软件退出后保持收纳"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Pin}"
|
||||
Toggled="ToggleSwitchKeepFoldAfterSoftwareExit_Toggled"/>
|
||||
|
||||
<TextBlock Text="{i18n:I18n Key=AutoSave_Title}" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardSaveScreenshotsInDateFolders"
|
||||
Header="截图按日期分文件夹"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Folder}"
|
||||
Toggled="ToggleSwitchSaveScreenshotsInDateFolders_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoSaveStrokesAtScreenshot"
|
||||
Header="截图时自动保存墨迹"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Save}"
|
||||
Toggled="ToggleSwitchAutoSaveStrokesAtScreenshot_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoSaveStrokesAtClear"
|
||||
Header="清屏时自动截图"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Save}"
|
||||
Toggled="ToggleSwitchAutoSaveStrokesAtClear_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardSaveStrokesAsXML"
|
||||
Header="墨迹保存为 XML"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Save}"
|
||||
Toggled="ToggleSwitchSaveStrokesAsXML_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardEnableAutoSaveStrokes"
|
||||
Header="定时自动保存墨迹"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Save}"
|
||||
Toggled="ToggleSwitchEnableAutoSaveStrokes_Toggled"/>
|
||||
|
||||
<ui:SettingsCard Header="自动保存间隔">
|
||||
<ui:SettingsCard.HeaderIcon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.QuietHours}"/>
|
||||
</ui:SettingsCard.HeaderIcon>
|
||||
<ComboBox x:Name="ComboBoxAutoSaveStrokesInterval"
|
||||
SelectionChanged="ComboBoxAutoSaveStrokesInterval_SelectionChanged">
|
||||
<ComboBoxItem Content="1 分钟" Tag="1"/>
|
||||
<ComboBoxItem Content="3 分钟" Tag="3"/>
|
||||
<ComboBoxItem Content="5 分钟" Tag="5"/>
|
||||
<ComboBoxItem Content="10 分钟" Tag="10"/>
|
||||
<ComboBoxItem Content="30 分钟" Tag="30"/>
|
||||
</ComboBox>
|
||||
</ui:SettingsCard>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoDelSavedFiles"
|
||||
Header="自动删除旧保存文件"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Delete}"
|
||||
Toggled="ToggleSwitchAutoDelSavedFiles_Toggled"/>
|
||||
|
||||
<ui:SettingsCard Header="自动删除天数阈值">
|
||||
<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="自动化最小笔画数">
|
||||
<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="保存全页墨迹"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Save}"
|
||||
Toggled="ToggleSwitchSaveFullPageStrokes_Toggled"/>
|
||||
|
||||
<TextBlock Text="悬浮窗拦截" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardFloatingWindowInterceptorEnabled"
|
||||
Header="启用悬浮窗拦截"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Shield}"
|
||||
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:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Filter}"/>
|
||||
</ui:SettingsExpander.HeaderIcon>
|
||||
<ui:SettingsExpander.Items>
|
||||
<ui:SettingsCard Header="希沃白板 3">
|
||||
<ui:SettingsCard.HeaderIcon><ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"/></ui:SettingsCard.HeaderIcon>
|
||||
<controls:LabeledSettingsCard x:Name="CardSeewoWhiteboard3Floating" Toggled="ToggleSwitchSeewoWhiteboard3Floating_Toggled"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard Header="希沃白板 5">
|
||||
<ui:SettingsCard.HeaderIcon><ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"/></ui:SettingsCard.HeaderIcon>
|
||||
<controls:LabeledSettingsCard x:Name="CardSeewoWhiteboard5Floating" Toggled="ToggleSwitchSeewoWhiteboard5Floating_Toggled"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard Header="希沃白板 5C">
|
||||
<ui:SettingsCard.HeaderIcon><ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"/></ui:SettingsCard.HeaderIcon>
|
||||
<controls:LabeledSettingsCard x:Name="CardSeewoWhiteboard5CFloating" Toggled="ToggleSwitchSeewoWhiteboard5CFloating_Toggled"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard Header="希沃品课侧栏">
|
||||
<ui:SettingsCard.HeaderIcon><ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"/></ui:SettingsCard.HeaderIcon>
|
||||
<controls:LabeledSettingsCard x:Name="CardSeewoPincoSideBarFloating" Toggled="ToggleSwitchSeewoPincoSideBarFloating_Toggled"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard Header="希沃品课画笔">
|
||||
<ui:SettingsCard.HeaderIcon><ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Edit}"/></ui:SettingsCard.HeaderIcon>
|
||||
<controls:LabeledSettingsCard x:Name="CardSeewoPincoDrawingFloating" Toggled="ToggleSwitchSeewoPincoDrawingFloating_Toggled"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard Header="希沃PPT小工具">
|
||||
<ui:SettingsCard.HeaderIcon><ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"/></ui:SettingsCard.HeaderIcon>
|
||||
<controls:LabeledSettingsCard x:Name="CardSeewoPPTFloating" Toggled="ToggleSwitchSeewoPPTFloating_Toggled"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard Header="AiClass">
|
||||
<ui:SettingsCard.HeaderIcon><ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"/></ui:SettingsCard.HeaderIcon>
|
||||
<controls:LabeledSettingsCard x:Name="CardAiClassFloating" Toggled="ToggleSwitchAiClassFloating_Toggled"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard Header="鸿合屏幕书写">
|
||||
<ui:SettingsCard.HeaderIcon><ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Edit}"/></ui:SettingsCard.HeaderIcon>
|
||||
<controls:LabeledSettingsCard x:Name="CardHiteAnnotationFloating" Toggled="ToggleSwitchHiteAnnotationFloating_Toggled"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard Header="畅言智慧课堂">
|
||||
<ui:SettingsCard.HeaderIcon><ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"/></ui:SettingsCard.HeaderIcon>
|
||||
<controls:LabeledSettingsCard x:Name="CardChangYanFloating" Toggled="ToggleSwitchChangYanFloating_Toggled"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard Header="畅言PPT">
|
||||
<ui:SettingsCard.HeaderIcon><ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"/></ui:SettingsCard.HeaderIcon>
|
||||
<controls:LabeledSettingsCard x:Name="CardChangYanPptFloating" Toggled="ToggleSwitchChangYanPptFloating_Toggled"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard Header="天喻教育云">
|
||||
<ui:SettingsCard.HeaderIcon><ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"/></ui:SettingsCard.HeaderIcon>
|
||||
<controls:LabeledSettingsCard x:Name="CardIntelligentClassFloating" Toggled="ToggleSwitchIntelligentClassFloating_Toggled"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard Header="希沃桌面画笔">
|
||||
<ui:SettingsCard.HeaderIcon><ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Edit}"/></ui:SettingsCard.HeaderIcon>
|
||||
<controls:LabeledSettingsCard x:Name="CardSeewoDesktopAnnotationFloating" Toggled="ToggleSwitchSeewoDesktopAnnotationFloating_Toggled"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard Header="希沃桌面侧栏">
|
||||
<ui:SettingsCard.HeaderIcon><ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"/></ui:SettingsCard.HeaderIcon>
|
||||
<controls:LabeledSettingsCard x:Name="CardSeewoDesktopSideBarFloating" Toggled="ToggleSwitchSeewoDesktopSideBarFloating_Toggled"/>
|
||||
</ui:SettingsCard>
|
||||
</ui:SettingsExpander.Items>
|
||||
</ui:SettingsExpander>
|
||||
|
||||
<TextBlock Text="文件关联" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>
|
||||
|
||||
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8" HorizontalAlignment="Left">
|
||||
<Button x:Name="BtnRegisterFileAssociation" Content="注册文件关联" Click="BtnRegisterFileAssociation_Click"/>
|
||||
<Button x:Name="BtnUnregisterFileAssociation" Content="取消文件关联" Click="BtnUnregisterFileAssociation_Click"/>
|
||||
<Button x:Name="BtnCheckFileAssociation" Content="检查关联状态" Click="BtnCheckFileAssociation_Click"/>
|
||||
</ikw:SimpleStackPanel>
|
||||
<TextBlock x:Name="TextBlockFileAssociationStatus" Margin="0,4,0,0"/>
|
||||
|
||||
<Rectangle Height="48" />
|
||||
</ikw:SimpleStackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</ui:Page>
|
||||
@@ -0,0 +1,647 @@
|
||||
using Ink_Canvas.Helpers;
|
||||
using Ink_Canvas.Windows.SettingsViews.Helpers;
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using Page = iNKORE.UI.WPF.Modern.Controls.Page;
|
||||
|
||||
namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||
{
|
||||
public partial class AutomationPage : Page
|
||||
{
|
||||
private bool _isLoaded = false;
|
||||
|
||||
public AutomationPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
Loaded += AutomationPage_Loaded;
|
||||
Unloaded += AutomationPage_Unloaded;
|
||||
}
|
||||
|
||||
private void AutomationPage_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
LoadSettings();
|
||||
_isLoaded = true;
|
||||
}
|
||||
|
||||
private void AutomationPage_Unloaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_isLoaded = false;
|
||||
}
|
||||
|
||||
private MainWindow GetMainWindow() => Application.Current.MainWindow as MainWindow;
|
||||
|
||||
private void LoadSettings()
|
||||
{
|
||||
_isLoaded = false;
|
||||
var auto = SettingsManager.Settings.Automation;
|
||||
|
||||
CardAutoFoldInEasiNote.IsOn = auto.IsAutoFoldInEasiNote;
|
||||
CardAutoFoldInEasiNoteIgnoreDesktopAnno.IsOn = auto.IsAutoFoldInEasiNoteIgnoreDesktopAnno;
|
||||
CardAutoFoldInEasiCamera.IsOn = auto.IsAutoFoldInEasiCamera;
|
||||
CardAutoFoldInEasiNote3.IsOn = auto.IsAutoFoldInEasiNote3;
|
||||
CardAutoFoldInEasiNote3C.IsOn = auto.IsAutoFoldInEasiNote3C;
|
||||
CardAutoFoldInEasiNote5C.IsOn = auto.IsAutoFoldInEasiNote5C;
|
||||
CardAutoFoldInSeewoPincoTeacher.IsOn = auto.IsAutoFoldInSeewoPincoTeacher;
|
||||
CardAutoFoldInHiteTouchPro.IsOn = auto.IsAutoFoldInHiteTouchPro;
|
||||
CardAutoFoldInHiteLightBoard.IsOn = auto.IsAutoFoldInHiteLightBoard;
|
||||
CardAutoFoldInHiteCamera.IsOn = auto.IsAutoFoldInHiteCamera;
|
||||
CardAutoFoldInWxBoardMain.IsOn = auto.IsAutoFoldInWxBoardMain;
|
||||
CardAutoFoldInOldZyBoard.IsOn = auto.IsAutoFoldInOldZyBoard;
|
||||
CardAutoFoldInMSWhiteboard.IsOn = auto.IsAutoFoldInMSWhiteboard;
|
||||
CardAutoFoldInAdmoxWhiteboard.IsOn = auto.IsAutoFoldInAdmoxWhiteboard;
|
||||
CardAutoFoldInAdmoxBooth.IsOn = auto.IsAutoFoldInAdmoxBooth;
|
||||
CardAutoFoldInQPoint.IsOn = auto.IsAutoFoldInQPoint;
|
||||
CardAutoFoldInYiYunVisualPresenter.IsOn = auto.IsAutoFoldInYiYunVisualPresenter;
|
||||
CardAutoFoldInMaxHubWhiteboard.IsOn = auto.IsAutoFoldInMaxHubWhiteboard;
|
||||
CardAutoFoldInPPTSlideShow.IsOn = auto.IsAutoFoldInPPTSlideShow;
|
||||
|
||||
CardAutoKillPptService.IsOn = auto.IsAutoKillPptService;
|
||||
CardAutoKillEasiNote.IsOn = auto.IsAutoKillEasiNote;
|
||||
CardAutoKillHiteAnnotation.IsOn = auto.IsAutoKillHiteAnnotation;
|
||||
CardAutoKillVComYouJiao.IsOn = auto.IsAutoKillVComYouJiao;
|
||||
CardAutoKillSeewoLauncher2DesktopAnnotation.IsOn = auto.IsAutoKillSeewoLauncher2DesktopAnnotation;
|
||||
CardAutoKillInkCanvas.IsOn = auto.IsAutoKillInkCanvas;
|
||||
CardAutoKillICA.IsOn = auto.IsAutoKillICA;
|
||||
CardAutoKillIDT.IsOn = auto.IsAutoKillIDT;
|
||||
CardAutoEnterAnnotationAfterKillHite.IsOn = auto.IsAutoEnterAnnotationAfterKillHite;
|
||||
|
||||
CardAutoEnterAnnotationModeWhenExitFoldMode.IsOn = auto.IsAutoEnterAnnotationModeWhenExitFoldMode;
|
||||
CardAutoFoldWhenExitWhiteboard.IsOn = auto.IsAutoFoldWhenExitWhiteboard;
|
||||
CardAutoFoldAfterPPTSlideShow.IsOn = auto.IsAutoFoldAfterPPTSlideShow;
|
||||
CardKeepFoldAfterSoftwareExit.IsOn = auto.KeepFoldAfterSoftwareExit;
|
||||
|
||||
CardSaveScreenshotsInDateFolders.IsOn = auto.IsSaveScreenshotsInDateFolders;
|
||||
CardAutoSaveStrokesAtScreenshot.IsOn = auto.IsAutoSaveStrokesAtScreenshot;
|
||||
CardAutoSaveStrokesAtClear.IsOn = auto.IsAutoSaveStrokesAtClear;
|
||||
CardSaveStrokesAsXML.IsOn = auto.IsSaveStrokesAsXML;
|
||||
CardEnableAutoSaveStrokes.IsOn = auto.IsEnableAutoSaveStrokes;
|
||||
|
||||
var interval = auto.AutoSaveStrokesIntervalMinutes;
|
||||
foreach (ComboBoxItem item in ComboBoxAutoSaveStrokesInterval.Items)
|
||||
{
|
||||
if (item.Tag != null && int.TryParse(item.Tag.ToString(), out int tagVal) && tagVal == interval)
|
||||
{
|
||||
ComboBoxAutoSaveStrokesInterval.SelectedItem = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
CardAutoDelSavedFiles.IsOn = auto.AutoDelSavedFiles;
|
||||
ComboBoxAutoDelSavedFilesDaysThreshold.SelectedIndex = auto.AutoDelSavedFilesDaysThreshold switch
|
||||
{
|
||||
7 => 0, 14 => 1, 30 => 2, 60 => 3, 90 => 4, _ => 2
|
||||
};
|
||||
|
||||
SideControlMinimumAutomationSlider.Value = auto.MinimumAutomationStrokeNumber;
|
||||
CardSaveFullPageStrokes.IsOn = auto.IsSaveFullPageStrokes;
|
||||
|
||||
CardFloatingWindowInterceptorEnabled.IsOn = auto.FloatingWindowInterceptor.IsEnabled;
|
||||
if (auto.FloatingWindowInterceptor.InterceptRules != null)
|
||||
{
|
||||
CardSeewoWhiteboard3Floating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoWhiteboard3Floating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoWhiteboard3Floating"];
|
||||
CardSeewoWhiteboard5Floating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoWhiteboard5Floating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoWhiteboard5Floating"];
|
||||
CardSeewoWhiteboard5CFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoWhiteboard5CFloating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoWhiteboard5CFloating"];
|
||||
CardSeewoPincoSideBarFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoPincoSideBarFloating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoPincoSideBarFloating"];
|
||||
CardSeewoPincoDrawingFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoPincoDrawingFloating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoPincoDrawingFloating"];
|
||||
CardSeewoPPTFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoPPTFloating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoPPTFloating"];
|
||||
CardAiClassFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("AiClassFloating") && auto.FloatingWindowInterceptor.InterceptRules["AiClassFloating"];
|
||||
CardHiteAnnotationFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("HiteAnnotationFloating") && auto.FloatingWindowInterceptor.InterceptRules["HiteAnnotationFloating"];
|
||||
CardChangYanFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("ChangYanFloating") && auto.FloatingWindowInterceptor.InterceptRules["ChangYanFloating"];
|
||||
CardChangYanPptFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("ChangYanPptFloating") && auto.FloatingWindowInterceptor.InterceptRules["ChangYanPptFloating"];
|
||||
CardIntelligentClassFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("IntelligentClassFloating") && auto.FloatingWindowInterceptor.InterceptRules["IntelligentClassFloating"];
|
||||
CardSeewoDesktopAnnotationFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoDesktopAnnotationFloating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoDesktopAnnotationFloating"];
|
||||
CardSeewoDesktopSideBarFloating.IsOn = auto.FloatingWindowInterceptor.InterceptRules.ContainsKey("SeewoDesktopSideBarFloating") && auto.FloatingWindowInterceptor.InterceptRules["SeewoDesktopSideBarFloating"];
|
||||
}
|
||||
|
||||
_isLoaded = true;
|
||||
}
|
||||
|
||||
#region AutoFold
|
||||
|
||||
private void ToggleSwitchAutoFoldInEasiNote_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldInEasiNote = CardAutoFoldInEasiNote.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.StartOrStoptimerCheckAutoFold();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldInEasiNoteIgnoreDesktopAnno_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldInEasiNoteIgnoreDesktopAnno = CardAutoFoldInEasiNoteIgnoreDesktopAnno.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldInEasiCamera_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldInEasiCamera = CardAutoFoldInEasiCamera.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.StartOrStoptimerCheckAutoFold();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldInEasiNote3_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldInEasiNote3 = CardAutoFoldInEasiNote3.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.StartOrStoptimerCheckAutoFold();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldInEasiNote3C_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldInEasiNote3C = CardAutoFoldInEasiNote3C.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.StartOrStoptimerCheckAutoFold();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldInEasiNote5C_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldInEasiNote5C = CardAutoFoldInEasiNote5C.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.StartOrStoptimerCheckAutoFold();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldInSeewoPincoTeacher_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldInSeewoPincoTeacher = CardAutoFoldInSeewoPincoTeacher.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.StartOrStoptimerCheckAutoFold();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldInHiteTouchPro_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldInHiteTouchPro = CardAutoFoldInHiteTouchPro.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.StartOrStoptimerCheckAutoFold();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldInHiteLightBoard_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldInHiteLightBoard = CardAutoFoldInHiteLightBoard.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.StartOrStoptimerCheckAutoFold();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldInHiteCamera_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldInHiteCamera = CardAutoFoldInHiteCamera.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.StartOrStoptimerCheckAutoFold();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldInWxBoardMain_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldInWxBoardMain = CardAutoFoldInWxBoardMain.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.StartOrStoptimerCheckAutoFold();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldInOldZyBoard_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldInOldZyBoard = CardAutoFoldInOldZyBoard.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.StartOrStoptimerCheckAutoFold();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldInMSWhiteboard_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldInMSWhiteboard = CardAutoFoldInMSWhiteboard.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.StartOrStoptimerCheckAutoFold();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldInAdmoxWhiteboard_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldInAdmoxWhiteboard = CardAutoFoldInAdmoxWhiteboard.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.StartOrStoptimerCheckAutoFold();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldInAdmoxBooth_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldInAdmoxBooth = CardAutoFoldInAdmoxBooth.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.StartOrStoptimerCheckAutoFold();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldInQPoint_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldInQPoint = CardAutoFoldInQPoint.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.StartOrStoptimerCheckAutoFold();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldInYiYunVisualPresenter_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldInYiYunVisualPresenter = CardAutoFoldInYiYunVisualPresenter.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.StartOrStoptimerCheckAutoFold();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldInMaxHubWhiteboard_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldInMaxHubWhiteboard = CardAutoFoldInMaxHubWhiteboard.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.StartOrStoptimerCheckAutoFold();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldInPPTSlideShow_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
var auto = SettingsManager.Settings.Automation;
|
||||
bool previousState = auto.IsAutoFoldInPPTSlideShow;
|
||||
auto.IsAutoFoldInPPTSlideShow = CardAutoFoldInPPTSlideShow.IsOn;
|
||||
if (previousState != auto.IsAutoFoldInPPTSlideShow)
|
||||
{
|
||||
LogHelper.WriteLogToFile($"PPT自动收纳设置已变更: {auto.IsAutoFoldInPPTSlideShow}", LogHelper.LogType.Trace);
|
||||
}
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
mw?.StartOrStoptimerCheckAutoFold();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region AutoKill
|
||||
|
||||
private void UpdateAutoKillTimer()
|
||||
{
|
||||
var mw = GetMainWindow();
|
||||
if (mw == null) return;
|
||||
var auto = SettingsManager.Settings.Automation;
|
||||
bool anyKill = auto.IsAutoKillEasiNote || auto.IsAutoKillPptService ||
|
||||
auto.IsAutoKillHiteAnnotation || auto.IsAutoKillInkCanvas ||
|
||||
auto.IsAutoKillICA || auto.IsAutoKillIDT || auto.IsAutoKillVComYouJiao ||
|
||||
auto.IsAutoKillSeewoLauncher2DesktopAnnotation;
|
||||
mw.UpdateAutoKillProcessTimer(anyKill);
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoKillPptService_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoKillPptService = CardAutoKillPptService.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
UpdateAutoKillTimer();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoKillEasiNote_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoKillEasiNote = CardAutoKillEasiNote.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
UpdateAutoKillTimer();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoKillHiteAnnotation_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoKillHiteAnnotation = CardAutoKillHiteAnnotation.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
UpdateAutoKillTimer();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoKillVComYouJiao_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoKillVComYouJiao = CardAutoKillVComYouJiao.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
UpdateAutoKillTimer();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoKillSeewoLauncher2DesktopAnnotation_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoKillSeewoLauncher2DesktopAnnotation = CardAutoKillSeewoLauncher2DesktopAnnotation.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
UpdateAutoKillTimer();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoKillInkCanvas_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoKillInkCanvas = CardAutoKillInkCanvas.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
UpdateAutoKillTimer();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoKillICA_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoKillICA = CardAutoKillICA.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
UpdateAutoKillTimer();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoKillIDT_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoKillIDT = CardAutoKillIDT.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
UpdateAutoKillTimer();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoEnterAnnotationAfterKillHite_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoEnterAnnotationAfterKillHite = CardAutoEnterAnnotationAfterKillHite.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Fold Mode
|
||||
|
||||
private void ToggleSwitchAutoEnterAnnotationModeWhenExitFoldMode_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoEnterAnnotationModeWhenExitFoldMode = CardAutoEnterAnnotationModeWhenExitFoldMode.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldWhenExitWhiteboard_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldWhenExitWhiteboard = CardAutoFoldWhenExitWhiteboard.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoFoldAfterPPTSlideShow_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoFoldAfterPPTSlideShow = CardAutoFoldAfterPPTSlideShow.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchKeepFoldAfterSoftwareExit_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.KeepFoldAfterSoftwareExit = CardKeepFoldAfterSoftwareExit.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Storage & Save
|
||||
|
||||
private void ToggleSwitchSaveScreenshotsInDateFolders_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsSaveScreenshotsInDateFolders = CardSaveScreenshotsInDateFolders.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoSaveStrokesAtScreenshot_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoSaveStrokesAtScreenshot = CardAutoSaveStrokesAtScreenshot.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoSaveStrokesAtClear_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsAutoSaveStrokesAtClear = CardAutoSaveStrokesAtClear.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchSaveStrokesAsXML_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsSaveStrokesAsXML = CardSaveStrokesAsXML.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchEnableAutoSaveStrokes_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsEnableAutoSaveStrokes = CardEnableAutoSaveStrokes.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.UpdateAutoSaveStrokesTimer();
|
||||
}
|
||||
|
||||
private void ComboBoxAutoSaveStrokesInterval_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded || ComboBoxAutoSaveStrokesInterval.SelectedItem == null) return;
|
||||
var selectedItem = ComboBoxAutoSaveStrokesInterval.SelectedItem as ComboBoxItem;
|
||||
if (selectedItem?.Tag != null && int.TryParse(selectedItem.Tag.ToString(), out int intervalMinutes))
|
||||
{
|
||||
SettingsManager.Settings.Automation.AutoSaveStrokesIntervalMinutes = intervalMinutes;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
GetMainWindow()?.UpdateAutoSaveStrokesTimer();
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoDelSavedFiles_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.AutoDelSavedFiles = CardAutoDelSavedFiles.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ComboBoxAutoDelSavedFilesDaysThreshold_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.AutoDelSavedFilesDaysThreshold =
|
||||
int.Parse(((ComboBoxItem)ComboBoxAutoDelSavedFilesDaysThreshold.SelectedItem).Content.ToString());
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void SideControlMinimumAutomationSlider_ValueChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.MinimumAutomationStrokeNumber = (int)SideControlMinimumAutomationSlider.Value;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchSaveFullPageStrokes_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Automation.IsSaveFullPageStrokes = CardSaveFullPageStrokes.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Floating Window Interceptor
|
||||
|
||||
private void ToggleSwitchFloatingWindowInterceptorEnabled_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
if (mw == null) return;
|
||||
SettingsManager.Settings.Automation.FloatingWindowInterceptor.IsEnabled = CardFloatingWindowInterceptorEnabled.IsOn;
|
||||
if (mw._floatingWindowInterceptorManager != null)
|
||||
{
|
||||
if (SettingsManager.Settings.Automation.FloatingWindowInterceptor.IsEnabled)
|
||||
mw._floatingWindowInterceptorManager.Start();
|
||||
else
|
||||
mw._floatingWindowInterceptorManager.Stop();
|
||||
}
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchSeewoWhiteboard3Floating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoWhiteboard3Floating, CardSeewoWhiteboard3Floating.IsOn);
|
||||
}
|
||||
|
||||
private void ToggleSwitchSeewoWhiteboard5Floating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoWhiteboard5Floating, CardSeewoWhiteboard5Floating.IsOn);
|
||||
}
|
||||
|
||||
private void ToggleSwitchSeewoWhiteboard5CFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoWhiteboard5CFloating, CardSeewoWhiteboard5CFloating.IsOn);
|
||||
}
|
||||
|
||||
private void ToggleSwitchSeewoPincoSideBarFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoPincoSideBarFloating, CardSeewoPincoSideBarFloating.IsOn);
|
||||
}
|
||||
|
||||
private void ToggleSwitchSeewoPincoDrawingFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoPincoDrawingFloating, CardSeewoPincoDrawingFloating.IsOn);
|
||||
}
|
||||
|
||||
private void ToggleSwitchSeewoPPTFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoPPTFloating, CardSeewoPPTFloating.IsOn);
|
||||
}
|
||||
|
||||
private void ToggleSwitchAiClassFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.AiClassFloating, CardAiClassFloating.IsOn);
|
||||
}
|
||||
|
||||
private void ToggleSwitchHiteAnnotationFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.HiteAnnotationFloating, CardHiteAnnotationFloating.IsOn);
|
||||
}
|
||||
|
||||
private void ToggleSwitchChangYanFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.ChangYanFloating, CardChangYanFloating.IsOn);
|
||||
}
|
||||
|
||||
private void ToggleSwitchChangYanPptFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.ChangYanPptFloating, CardChangYanPptFloating.IsOn);
|
||||
}
|
||||
|
||||
private void ToggleSwitchIntelligentClassFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.IntelligentClassFloating, CardIntelligentClassFloating.IsOn);
|
||||
}
|
||||
|
||||
private void ToggleSwitchSeewoDesktopAnnotationFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoDesktopAnnotationFloating, CardSeewoDesktopAnnotationFloating.IsOn);
|
||||
}
|
||||
|
||||
private void ToggleSwitchSeewoDesktopSideBarFloating_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
GetMainWindow()?.SetInterceptRule(FloatingWindowInterceptor.InterceptType.SeewoDesktopSideBarFloating, CardSeewoDesktopSideBarFloating.IsOn);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region File Association
|
||||
|
||||
private void BtnRegisterFileAssociation_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool success = FileAssociationManager.RegisterFileAssociation();
|
||||
UpdateFileAssociationStatus();
|
||||
var mw = GetMainWindow();
|
||||
if (mw != null)
|
||||
mw.ShowNotification(success ? "文件关联注册成功" : "文件关联注册失败");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogToFile($"注册文件关联失败: {ex.Message}", LogHelper.LogType.Error);
|
||||
UpdateFileAssociationStatus();
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnUnregisterFileAssociation_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool success = FileAssociationManager.UnregisterFileAssociation();
|
||||
UpdateFileAssociationStatus();
|
||||
var mw = GetMainWindow();
|
||||
if (mw != null)
|
||||
mw.ShowNotification(success ? "文件关联已取消" : "取消文件关联失败");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogToFile($"取消文件关联失败: {ex.Message}", LogHelper.LogType.Error);
|
||||
UpdateFileAssociationStatus();
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnCheckFileAssociation_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
UpdateFileAssociationStatus();
|
||||
}
|
||||
|
||||
private void UpdateFileAssociationStatus()
|
||||
{
|
||||
try
|
||||
{
|
||||
bool isRegistered = FileAssociationManager.IsFileAssociationRegistered();
|
||||
if (isRegistered)
|
||||
{
|
||||
TextBlockFileAssociationStatus.Text = "✓ .icstk文件关联已注册";
|
||||
TextBlockFileAssociationStatus.Foreground = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.LightGreen);
|
||||
}
|
||||
else
|
||||
{
|
||||
TextBlockFileAssociationStatus.Text = "✗ .icstk文件关联未注册";
|
||||
TextBlockFileAssociationStatus.Foreground = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.LightCoral);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TextBlockFileAssociationStatus.Text = "✗ 检查文件关联状态时出错";
|
||||
TextBlockFileAssociationStatus.Foreground = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.LightCoral);
|
||||
LogHelper.WriteLogToFile($"检查文件关联状态失败: {ex.Message}", LogHelper.LogType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -119,6 +119,9 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||
{
|
||||
SettingsManager.Settings.Canvas.DisablePressure = false;
|
||||
CardDisablePressure.IsOn = false;
|
||||
var mw = Application.Current.MainWindow as MainWindow;
|
||||
if (mw != null && mw.inkCanvas != null)
|
||||
mw.inkCanvas.DefaultDrawingAttributes.IgnorePressure = false;
|
||||
}
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
@@ -133,6 +136,9 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||
CardEnablePressureTouchMode.IsOn = false;
|
||||
}
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
var mw = Application.Current.MainWindow as MainWindow;
|
||||
if (mw != null && mw.inkCanvas != null)
|
||||
mw.inkCanvas.DefaultDrawingAttributes.IgnorePressure = CardDisablePressure.IsOn;
|
||||
}
|
||||
|
||||
private void ComboBoxEraserSize_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
@@ -140,6 +146,14 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Canvas.EraserSize = ComboBoxEraserSize.SelectedIndex;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
var mw = Application.Current.MainWindow as MainWindow;
|
||||
if (mw != null)
|
||||
{
|
||||
if (mw.ComboBoxEraserSizeFloatingBar != null)
|
||||
mw.ComboBoxEraserSizeFloatingBar.SelectedIndex = ComboBoxEraserSize.SelectedIndex;
|
||||
if (mw.BoardComboBoxEraserSize != null)
|
||||
mw.BoardComboBoxEraserSize.SelectedIndex = ComboBoxEraserSize.SelectedIndex;
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleSwitchHideStrokeWhenSelecting_Toggled(object sender, RoutedEventArgs e)
|
||||
@@ -221,6 +235,15 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||
SettingsManager.Settings.Canvas.EnableInkFade = ToggleSwitchEnableInkFade.IsOn;
|
||||
ExpanderEnableInkFade.IsExpanded = ToggleSwitchEnableInkFade.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
var mw = Application.Current.MainWindow as MainWindow;
|
||||
if (mw != null)
|
||||
{
|
||||
mw.UpdateInkFadeManager(ToggleSwitchEnableInkFade.IsOn, SettingsManager.Settings.Canvas.InkFadeTime);
|
||||
if (mw.ToggleSwitchInkFadeInPanel != null)
|
||||
mw.ToggleSwitchInkFadeInPanel.IsOn = ToggleSwitchEnableInkFade.IsOn;
|
||||
if (mw.ToggleSwitchInkFadeInPanel2 != null)
|
||||
mw.ToggleSwitchInkFadeInPanel2.IsOn = ToggleSwitchEnableInkFade.IsOn;
|
||||
}
|
||||
}
|
||||
|
||||
private void InkFadeTimeSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||
@@ -228,6 +251,11 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.Canvas.InkFadeTime = (int)e.NewValue;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
var mw = Application.Current.MainWindow as MainWindow;
|
||||
if (mw != null && SettingsManager.Settings.Canvas.EnableInkFade)
|
||||
{
|
||||
mw.UpdateInkFadeManager(true, (int)e.NewValue);
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleSwitchHideInkFadeControlInPenMenu_Toggled(object sender, RoutedEventArgs e)
|
||||
|
||||
@@ -70,6 +70,14 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.InkToShape.IsInkToShapeEnabled = CardEnableInkToShape.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
var mw = Application.Current.MainWindow as MainWindow;
|
||||
if (mw != null)
|
||||
{
|
||||
if (mw.FloatingBarToggleSwitchEnableInkToShape != null)
|
||||
mw.FloatingBarToggleSwitchEnableInkToShape.IsOn = CardEnableInkToShape.IsOn;
|
||||
if (mw.BoardToggleSwitchEnableInkToShape != null)
|
||||
mw.BoardToggleSwitchEnableInkToShape.IsOn = CardEnableInkToShape.IsOn;
|
||||
}
|
||||
}
|
||||
|
||||
private void ComboBoxShapeRecognitionEngine_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
|
||||
@@ -0,0 +1,278 @@
|
||||
<ui:Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.PowerPointPage"
|
||||
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:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
|
||||
xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
mc:Ignorable="d"
|
||||
Title="{i18n:I18n Key=Nav_PPT_Settings}">
|
||||
|
||||
<ScrollViewer PanningMode="VerticalFirst">
|
||||
<Grid Margin="59,0,59,0">
|
||||
<FrameworkElement.Resources>
|
||||
<sys:Double x:Key="SettingsCardSpacing">4</sys:Double>
|
||||
<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="{i18n:I18n Key=PPT_GroupTitle}" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardSupportPowerPoint"
|
||||
Header="{i18n:I18n Key=PPT_SupportPowerPoint}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||
Toggled="ToggleSwitchSupportPowerPoint_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardPowerPointEnhancement"
|
||||
Header="{i18n:I18n Key=PPT_Enhancement}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Puzzle}"
|
||||
Toggled="ToggleSwitchPowerPointEnhancement_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardSkipAnimationsWhenGoNext"
|
||||
Header="{i18n:I18n Key=PPT_SkipAnimations}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.FastForward}"
|
||||
Toggled="ToggleSwitchSkipAnimationsWhenGoNext_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardUseRotPptLink"
|
||||
Header="{i18n:I18n Key=PPT_UseRot}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Link}"
|
||||
Toggled="ToggleSwitchUseRotPptLink_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardSupportWPS"
|
||||
Header="{i18n:I18n Key=PPT_SupportWPS}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Document}"
|
||||
Toggled="ToggleSwitchSupportWPS_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardEnableWppProcessKill"
|
||||
Header="{i18n:I18n Key=PPT_KillWppProcess}"
|
||||
Description="{i18n:I18n Key=PPT_KillWppHint}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Cancel}"
|
||||
Toggled="ToggleSwitchEnableWppProcessKill_Toggled"/>
|
||||
|
||||
<TextBlock Text="{i18n:I18n Key=PPT_FlipButtonsTitle}" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardShowPPTButton"
|
||||
Header="{i18n:I18n Key=PPT_ShowFlipButtons}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.ShowResults}"
|
||||
Toggled="ToggleSwitchShowPPTButton_OnToggled"/>
|
||||
|
||||
<ui:SettingsExpander Header="{i18n:I18n Key=PPT_Position_Left}"
|
||||
Visibility="{Binding IsOn, ElementName=CardShowPPTButton, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||
IsExpanded="{Binding IsOn, ElementName=CardShowPPTButton, Mode=OneWay}">
|
||||
<ui:SettingsExpander.HeaderIcon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.CaretSolidLeft}"/>
|
||||
</ui:SettingsExpander.HeaderIcon>
|
||||
<ui:SettingsExpander.Content>
|
||||
<CheckBox x:Name="CheckboxEnableLSPPTButton" Checked="CheckboxEnableLSPPTButton_IsCheckChanged" Unchecked="CheckboxEnableLSPPTButton_IsCheckChanged"/>
|
||||
</ui:SettingsExpander.Content>
|
||||
<ui:SettingsExpander.Items>
|
||||
<ui:SettingsCard Header="{i18n:I18n Key=PPT_LeftOffset}">
|
||||
<Slider x:Name="PPTButtonLeftPositionValueSlider" Minimum="-500" Maximum="500" Width="200" ValueChanged="PPTButtonLeftPositionValueSlider_ValueChanged"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard Header="{i18n:I18n Key=PPT_LeftOpacity}" Visibility="{Binding IsChecked, ElementName=CheckboxSPPTHalfOpacity, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<Slider x:Name="PPTLSButtonOpacityValueSlider" Minimum="0.1" Maximum="1.0" Width="200" ValueChanged="PPTLSButtonOpacityValueSlider_ValueChanged"/>
|
||||
</ui:SettingsCard>
|
||||
</ui:SettingsExpander.Items>
|
||||
</ui:SettingsExpander>
|
||||
|
||||
<ui:SettingsExpander Header="{i18n:I18n Key=PPT_Position_Right}"
|
||||
Visibility="{Binding IsOn, ElementName=CardShowPPTButton, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||
IsExpanded="{Binding IsOn, ElementName=CardShowPPTButton, Mode=OneWay}">
|
||||
<ui:SettingsExpander.HeaderIcon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.CaretSolidRight}"/>
|
||||
</ui:SettingsExpander.HeaderIcon>
|
||||
<ui:SettingsExpander.Content>
|
||||
<CheckBox x:Name="CheckboxEnableRSPPTButton" Checked="CheckboxEnableRSPPTButton_IsCheckChanged" Unchecked="CheckboxEnableRSPPTButton_IsCheckChanged"/>
|
||||
</ui:SettingsExpander.Content>
|
||||
<ui:SettingsExpander.Items>
|
||||
<ui:SettingsCard Header="{i18n:I18n Key=PPT_RightOffset}">
|
||||
<Slider x:Name="PPTButtonRightPositionValueSlider" Minimum="-500" Maximum="500" Width="200" ValueChanged="PPTButtonRightPositionValueSlider_ValueChanged"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard Header="{i18n:I18n Key=PPT_RightOpacity}" Visibility="{Binding IsChecked, ElementName=CheckboxSPPTHalfOpacity, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<Slider x:Name="PPTRSButtonOpacityValueSlider" Minimum="0.1" Maximum="1.0" Width="200" ValueChanged="PPTRSButtonOpacityValueSlider_ValueChanged"/>
|
||||
</ui:SettingsCard>
|
||||
</ui:SettingsExpander.Items>
|
||||
</ui:SettingsExpander>
|
||||
|
||||
<ui:SettingsExpander Header="{i18n:I18n Key=PPT_Position_LeftBottom}"
|
||||
Visibility="{Binding IsOn, ElementName=CardShowPPTButton, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||
IsExpanded="{Binding IsOn, ElementName=CardShowPPTButton, Mode=OneWay}">
|
||||
<ui:SettingsExpander.HeaderIcon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.CaretSolidDown}"/>
|
||||
</ui:SettingsExpander.HeaderIcon>
|
||||
<ui:SettingsExpander.Content>
|
||||
<CheckBox x:Name="CheckboxEnableLBPPTButton" Checked="CheckboxEnableLBPPTButton_IsCheckChanged" Unchecked="CheckboxEnableLBPPTButton_IsCheckChanged"/>
|
||||
</ui:SettingsExpander.Content>
|
||||
<ui:SettingsExpander.Items>
|
||||
<ui:SettingsCard Header="{i18n:I18n Key=PPT_LeftBottomOffset}">
|
||||
<Slider x:Name="PPTButtonLBPositionValueSlider" Minimum="-500" Maximum="500" Width="200" ValueChanged="PPTButtonLBPositionValueSlider_ValueChanged"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard Header="{i18n:I18n Key=PPT_LeftBottomOpacity}" Visibility="{Binding IsChecked, ElementName=CheckboxBPPTHalfOpacity, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<Slider x:Name="PPTLBButtonOpacityValueSlider" Minimum="0.1" Maximum="1.0" Width="200" ValueChanged="PPTLBButtonOpacityValueSlider_ValueChanged"/>
|
||||
</ui:SettingsCard>
|
||||
</ui:SettingsExpander.Items>
|
||||
</ui:SettingsExpander>
|
||||
|
||||
<ui:SettingsExpander Header="{i18n:I18n Key=PPT_Position_RightBottom}"
|
||||
Visibility="{Binding IsOn, ElementName=CardShowPPTButton, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||
IsExpanded="{Binding IsOn, ElementName=CardShowPPTButton, Mode=OneWay}">
|
||||
<ui:SettingsExpander.HeaderIcon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.CaretSolidDown}"/>
|
||||
</ui:SettingsExpander.HeaderIcon>
|
||||
<ui:SettingsExpander.Content>
|
||||
<CheckBox x:Name="CheckboxEnableRBPPTButton" Checked="CheckboxEnableRBPPTButton_IsCheckChanged" Unchecked="CheckboxEnableRBPPTButton_IsCheckChanged"/>
|
||||
</ui:SettingsExpander.Content>
|
||||
<ui:SettingsExpander.Items>
|
||||
<ui:SettingsCard Header="{i18n:I18n Key=PPT_RightBottomOffset}">
|
||||
<Slider x:Name="PPTButtonRBPositionValueSlider" Minimum="-500" Maximum="500" Width="200" ValueChanged="PPTButtonRBPositionValueSlider_ValueChanged"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard Header="{i18n:I18n Key=PPT_RightBottomOpacity}" Visibility="{Binding IsChecked, ElementName=CheckboxBPPTHalfOpacity, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<Slider x:Name="PPTRBButtonOpacityValueSlider" Minimum="0.1" Maximum="1.0" Width="200" ValueChanged="PPTRBButtonOpacityValueSlider_ValueChanged"/>
|
||||
</ui:SettingsCard>
|
||||
</ui:SettingsExpander.Items>
|
||||
</ui:SettingsExpander>
|
||||
|
||||
<ui:SettingsCard Header="{i18n:I18n Key=PPT_SideGroupTitle}"
|
||||
Visibility="{Binding IsOn, ElementName=CardShowPPTButton, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<ui:SettingsCard.HeaderIcon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.DockLeft}"/>
|
||||
</ui:SettingsCard.HeaderIcon>
|
||||
<ikw:SimpleStackPanel Orientation="Vertical" Spacing="6">
|
||||
<CheckBox x:Name="CheckboxSPPTDisplayPage" Content="{i18n:I18n Key=PPT_ShowPageNumber}" Checked="CheckboxSPPTDisplayPage_IsCheckChange" Unchecked="CheckboxSPPTDisplayPage_IsCheckChange"/>
|
||||
<CheckBox x:Name="CheckboxSPPTHalfOpacity" Content="{i18n:I18n Key=PPT_HalfOpacity}" Checked="CheckboxSPPTHalfOpacity_IsCheckChange" Unchecked="CheckboxSPPTHalfOpacity_IsCheckChange"/>
|
||||
<CheckBox x:Name="CheckboxSPPTBlackBackground" Content="{i18n:I18n Key=PPT_BlackBackground}" Checked="CheckboxSPPTBlackBackground_IsCheckChange" Unchecked="CheckboxSPPTBlackBackground_IsCheckChange"/>
|
||||
</ikw:SimpleStackPanel>
|
||||
</ui:SettingsCard>
|
||||
|
||||
<ui:SettingsCard Header="{i18n:I18n Key=PPT_BottomGroupTitle}"
|
||||
Visibility="{Binding IsOn, ElementName=CardShowPPTButton, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<ui:SettingsCard.HeaderIcon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.DockBottom}"/>
|
||||
</ui:SettingsCard.HeaderIcon>
|
||||
<ikw:SimpleStackPanel Orientation="Vertical" Spacing="6">
|
||||
<CheckBox x:Name="CheckboxBPPTDisplayPage" Content="{i18n:I18n Key=PPT_ShowPageNumber}" Checked="CheckboxBPPTDisplayPage_IsCheckChange" Unchecked="CheckboxBPPTDisplayPage_IsCheckChange"/>
|
||||
<CheckBox x:Name="CheckboxBPPTHalfOpacity" Content="{i18n:I18n Key=PPT_HalfOpacity}" Checked="CheckboxBPPTHalfOpacity_IsCheckChange" Unchecked="CheckboxBPPTHalfOpacity_IsCheckChange"/>
|
||||
<CheckBox x:Name="CheckboxBPPTBlackBackground" Content="{i18n:I18n Key=PPT_BlackBackground}" Checked="CheckboxBPPTBlackBackground_IsCheckChange" Unchecked="CheckboxBPPTBlackBackground_IsCheckChange"/>
|
||||
</ikw:SimpleStackPanel>
|
||||
</ui:SettingsCard>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardEnablePPTButtonPageClickable"
|
||||
Header="{i18n:I18n Key=PPT_PageButtonClickable}"
|
||||
Description="{i18n:I18n Key=PPT_PageButtonClickableHint}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.TouchPointer}"
|
||||
Visibility="{Binding IsOn, ElementName=CardShowPPTButton, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||
Toggled="ToggleSwitchEnablePPTButtonPageClickable_OnToggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardEnablePPTButtonLongPressPageTurn"
|
||||
Header="{i18n:I18n Key=PPT_LongPressPageTurn}"
|
||||
Description="{i18n:I18n Key=PPT_LongPressPageTurnHint}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Touch}"
|
||||
Visibility="{Binding IsOn, ElementName=CardShowPPTButton, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||
Toggled="ToggleSwitchEnablePPTButtonLongPressPageTurn_OnToggled"/>
|
||||
|
||||
<TextBlock Text="{i18n:I18n Key=PPT_EnterAnnotationOnShow}" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardShowCanvasAtNewSlideShow"
|
||||
Header="{i18n:I18n Key=PPT_EnterAnnotationOnShow}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Edit}"
|
||||
Toggled="ToggleSwitchShowCanvasAtNewSlideShow_Toggled"/>
|
||||
|
||||
<TextBlock Text="{i18n:I18n Key=Nav_PPT_Settings}" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardEnableTwoFingerGestureInPresentationMode"
|
||||
Header="{i18n:I18n Key=PPT_TwoFingerGesture}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.TouchPointer}"
|
||||
Toggled="ToggleSwitchEnableTwoFingerGestureInPresentationMode_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardEnableFingerGestureSlideShowControl"
|
||||
Header="{i18n:I18n Key=PPT_FingerGestureSlide}"
|
||||
Description="{i18n:I18n Key=PPT_FingerGestureSlideHint}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Handwriting}"
|
||||
Toggled="ToggleSwitchEnableFingerGestureSlideShowControl_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardShowGestureButtonInSlideShow"
|
||||
Header="{i18n:I18n Key=PPT_ShowGestureButtonInShow}"
|
||||
Description="{i18n:I18n Key=PPT_ShowGestureButtonInShowHint}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.TouchPointer}"
|
||||
Toggled="ToggleSwitchShowGestureButtonInSlideShow_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardEnablePPTTimeCapsule"
|
||||
Header="{i18n:I18n Key=PPT_TimeCapsule}"
|
||||
Description="{i18n:I18n Key=PPT_TimeCapsuleHint}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.QuietHours}"
|
||||
Toggled="ToggleSwitchEnablePPTTimeCapsule_Toggled"/>
|
||||
|
||||
<ui:SettingsCard Header="{i18n:I18n Key=PPT_TimeCapsulePosition}">
|
||||
<ui:SettingsCard.HeaderIcon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Location}"/>
|
||||
</ui:SettingsCard.HeaderIcon>
|
||||
<ComboBox x:Name="ComboBoxPPTTimeCapsulePosition"
|
||||
SelectionChanged="ComboBoxPPTTimeCapsulePosition_SelectionChanged">
|
||||
<ComboBoxItem Content="{i18n:I18n Key=PPT_TimeCapsulePos_TL}"/>
|
||||
<ComboBoxItem Content="{i18n:I18n Key=PPT_TimeCapsulePos_TR}"/>
|
||||
<ComboBoxItem Content="{i18n:I18n Key=PPT_TimeCapsulePos_Center}"/>
|
||||
</ComboBox>
|
||||
</ui:SettingsCard>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardShowPPTSidebarByDefault"
|
||||
Header="{i18n:I18n Key=PPT_ShowQuickPanelInShow}"
|
||||
Description="{i18n:I18n Key=PPT_ShowQuickPanelInShowHint}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.OpenPane}"
|
||||
Toggled="ToggleSwitchShowPPTSidebarByDefault_Toggled"/>
|
||||
|
||||
<TextBlock Text="{i18n:I18n Key=PPT_AutoScreenshot}" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoSaveScreenShotInPowerPoint"
|
||||
Header="{i18n:I18n Key=PPT_AutoScreenshot}"
|
||||
Description="{i18n:I18n Key=PPT_AutoScreenshotHint}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Camera}"
|
||||
Toggled="ToggleSwitchAutoSaveScreenShotInPowerPoint_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAutoSaveStrokesInPowerPoint"
|
||||
Header="{i18n:I18n Key=PPT_AutoSaveStrokes}"
|
||||
Description="{i18n:I18n Key=PPT_AutoSaveStrokesHint}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Save}"
|
||||
Toggled="ToggleSwitchAutoSaveStrokesInPowerPoint_Toggled"/>
|
||||
|
||||
<TextBlock Text="{i18n:I18n Key=PPT_RememberLastPage}" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardNotifyPreviousPage"
|
||||
Header="{i18n:I18n Key=PPT_RememberLastPage}"
|
||||
Description="{i18n:I18n Key=PPT_RememberLastPageHint}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.History}"
|
||||
Toggled="ToggleSwitchNotifyPreviousPage_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardAlwaysGoToFirstPageOnReenter"
|
||||
Header="{i18n:I18n Key=PPT_GoToFirstPageOnReenter}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Rewind}"
|
||||
Toggled="ToggleSwitchAlwaysGoToFirstPageOnReenter_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardNotifyHiddenPage"
|
||||
Header="{i18n:I18n Key=PPT_NotifyHiddenPage}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Hide}"
|
||||
Toggled="ToggleSwitchNotifyHiddenPage_Toggled"/>
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardNotifyAutoPlayPresentation"
|
||||
Header="{i18n:I18n Key=PPT_NotifyAutoPlay}"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.Play}"
|
||||
Toggled="ToggleSwitchNotifyAutoPlayPresentation_Toggled"/>
|
||||
|
||||
<Rectangle Height="48" />
|
||||
</ikw:SimpleStackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</ui:Page>
|
||||
@@ -0,0 +1,700 @@
|
||||
using Ink_Canvas.Helpers;
|
||||
using Ink_Canvas.Windows.SettingsViews.Helpers;
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using Page = iNKORE.UI.WPF.Modern.Controls.Page;
|
||||
|
||||
namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||
{
|
||||
public partial class PowerPointPage : Page
|
||||
{
|
||||
private bool _isLoaded = false;
|
||||
private DelayAction _sliderDelayAction = new DelayAction();
|
||||
|
||||
public PowerPointPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
Loaded += PowerPointPage_Loaded;
|
||||
Unloaded += PowerPointPage_Unloaded;
|
||||
}
|
||||
|
||||
private void PowerPointPage_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
LoadSettings();
|
||||
_isLoaded = true;
|
||||
}
|
||||
|
||||
private void PowerPointPage_Unloaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_isLoaded = false;
|
||||
}
|
||||
|
||||
private MainWindow GetMainWindow() => Application.Current.MainWindow as MainWindow;
|
||||
|
||||
private void LoadSettings()
|
||||
{
|
||||
_isLoaded = false;
|
||||
var ppt = SettingsManager.Settings.PowerPointSettings;
|
||||
|
||||
CardSupportPowerPoint.IsOn = ppt.PowerPointSupport;
|
||||
CardPowerPointEnhancement.IsOn = ppt.EnablePowerPointEnhancement;
|
||||
CardSkipAnimationsWhenGoNext.IsOn = ppt.SkipAnimationsWhenGoNext;
|
||||
CardUseRotPptLink.IsOn = ppt.UseRotPptLink;
|
||||
CardSupportWPS.IsOn = ppt.IsSupportWPS;
|
||||
CardEnableWppProcessKill.IsOn = ppt.EnableWppProcessKill;
|
||||
|
||||
CardShowPPTButton.IsOn = ppt.ShowPPTButton;
|
||||
var displayOpt = ppt.PPTButtonsDisplayOption.ToString();
|
||||
CheckboxEnableLBPPTButton.IsChecked = displayOpt.Length > 0 && displayOpt[0] == '2';
|
||||
CheckboxEnableRBPPTButton.IsChecked = displayOpt.Length > 1 && displayOpt[1] == '2';
|
||||
CheckboxEnableLSPPTButton.IsChecked = displayOpt.Length > 2 && displayOpt[2] == '2';
|
||||
CheckboxEnableRSPPTButton.IsChecked = displayOpt.Length > 3 && displayOpt[3] == '2';
|
||||
|
||||
PPTButtonLeftPositionValueSlider.Value = ppt.PPTLSButtonPosition;
|
||||
PPTButtonRightPositionValueSlider.Value = ppt.PPTRSButtonPosition;
|
||||
PPTButtonLBPositionValueSlider.Value = ppt.PPTLBButtonPosition;
|
||||
PPTButtonRBPositionValueSlider.Value = ppt.PPTRBButtonPosition;
|
||||
|
||||
PPTLSButtonOpacityValueSlider.Value = ppt.PPTLSButtonOpacity;
|
||||
PPTRSButtonOpacityValueSlider.Value = ppt.PPTRSButtonOpacity;
|
||||
PPTLBButtonOpacityValueSlider.Value = ppt.PPTLBButtonOpacity;
|
||||
PPTRBButtonOpacityValueSlider.Value = ppt.PPTRBButtonOpacity;
|
||||
|
||||
var sOpt = ppt.PPTSButtonsOption.ToString();
|
||||
CheckboxSPPTDisplayPage.IsChecked = sOpt.Length > 0 && sOpt[0] == '2';
|
||||
CheckboxSPPTHalfOpacity.IsChecked = sOpt.Length > 1 && sOpt[1] == '2';
|
||||
CheckboxSPPTBlackBackground.IsChecked = sOpt.Length > 2 && sOpt[2] == '2';
|
||||
|
||||
var bOpt = ppt.PPTBButtonsOption.ToString();
|
||||
CheckboxBPPTDisplayPage.IsChecked = bOpt.Length > 0 && bOpt[0] == '2';
|
||||
CheckboxBPPTHalfOpacity.IsChecked = bOpt.Length > 1 && bOpt[1] == '2';
|
||||
CheckboxBPPTBlackBackground.IsChecked = bOpt.Length > 2 && bOpt[2] == '2';
|
||||
|
||||
CardEnablePPTButtonPageClickable.IsOn = ppt.EnablePPTButtonPageClickable;
|
||||
CardEnablePPTButtonLongPressPageTurn.IsOn = ppt.EnablePPTButtonLongPressPageTurn;
|
||||
|
||||
CardShowCanvasAtNewSlideShow.IsOn = ppt.IsShowCanvasAtNewSlideShow;
|
||||
|
||||
CardEnableTwoFingerGestureInPresentationMode.IsOn = ppt.IsEnableTwoFingerGestureInPresentationMode;
|
||||
CardEnableFingerGestureSlideShowControl.IsOn = ppt.IsEnableFingerGestureSlideShowControl;
|
||||
CardShowGestureButtonInSlideShow.IsOn = ppt.ShowGestureButtonInSlideShow;
|
||||
CardEnablePPTTimeCapsule.IsOn = ppt.EnablePPTTimeCapsule;
|
||||
ComboBoxPPTTimeCapsulePosition.SelectedIndex = ppt.PPTTimeCapsulePosition;
|
||||
CardShowPPTSidebarByDefault.IsOn = ppt.ShowPPTSidebarByDefault;
|
||||
|
||||
CardAutoSaveScreenShotInPowerPoint.IsOn = ppt.IsAutoSaveScreenShotInPowerPoint;
|
||||
CardAutoSaveStrokesInPowerPoint.IsOn = ppt.IsAutoSaveStrokesInPowerPoint;
|
||||
|
||||
CardNotifyPreviousPage.IsOn = ppt.IsNotifyPreviousPage;
|
||||
CardAlwaysGoToFirstPageOnReenter.IsOn = ppt.IsAlwaysGoToFirstPageOnReenter;
|
||||
CardNotifyHiddenPage.IsOn = ppt.IsNotifyHiddenPage;
|
||||
CardNotifyAutoPlayPresentation.IsOn = ppt.IsNotifyAutoPlayPresentation;
|
||||
|
||||
_isLoaded = true;
|
||||
}
|
||||
|
||||
#region PPT Basic
|
||||
|
||||
private void ToggleSwitchSupportPowerPoint_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
var ppt = SettingsManager.Settings.PowerPointSettings;
|
||||
ppt.PowerPointSupport = CardSupportPowerPoint.IsOn;
|
||||
if (!ppt.PowerPointSupport && ppt.IsSupportWPS)
|
||||
{
|
||||
ppt.IsSupportWPS = false;
|
||||
CardSupportWPS.IsOn = false;
|
||||
if (mw?.PPTManager != null) mw.PPTManager.IsSupportWPS = false;
|
||||
}
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
if (mw != null)
|
||||
{
|
||||
if (ppt.PowerPointSupport)
|
||||
{
|
||||
if (mw.PPTManager == null) mw.InitializePPTManagers();
|
||||
mw.StartPPTMonitoring();
|
||||
}
|
||||
else mw.StopPPTMonitoring();
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleSwitchPowerPointEnhancement_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
var ppt = SettingsManager.Settings.PowerPointSettings;
|
||||
ppt.EnablePowerPointEnhancement = CardPowerPointEnhancement.IsOn;
|
||||
if (ppt.EnablePowerPointEnhancement)
|
||||
{
|
||||
ppt.IsSupportWPS = false;
|
||||
CardSupportWPS.IsOn = false;
|
||||
if (mw?.PPTManager != null) mw.PPTManager.IsSupportWPS = false;
|
||||
}
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
if (mw != null)
|
||||
{
|
||||
if (ppt.EnablePowerPointEnhancement)
|
||||
mw.StartPowerPointProcessMonitoring();
|
||||
else
|
||||
mw.StopPowerPointProcessMonitoring();
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleSwitchSkipAnimationsWhenGoNext_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
SettingsManager.Settings.PowerPointSettings.SkipAnimationsWhenGoNext = CardSkipAnimationsWhenGoNext.IsOn;
|
||||
if (mw?.PPTManager != null)
|
||||
mw.PPTManager.SkipAnimationsWhenNavigating = CardSkipAnimationsWhenGoNext.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchUseRotPptLink_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
var ppt = SettingsManager.Settings.PowerPointSettings;
|
||||
ppt.UseRotPptLink = CardUseRotPptLink.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
try
|
||||
{
|
||||
if (mw != null)
|
||||
{
|
||||
mw.StopPPTMonitoring();
|
||||
if (ppt.UseRotPptLink && ppt.EnablePowerPointEnhancement)
|
||||
{
|
||||
ppt.EnablePowerPointEnhancement = false;
|
||||
CardPowerPointEnhancement.IsOn = false;
|
||||
mw.StopPowerPointProcessMonitoring();
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
mw.InitializePPTManagers();
|
||||
if (ppt.PowerPointSupport) mw.StartPPTMonitoring();
|
||||
LogHelper.WriteLogToFile($"已切换 PPT 联动架构为 {(ppt.UseRotPptLink ? "ROT" : "COM")}", LogHelper.LogType.Event);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { LogHelper.WriteLogToFile($"切换 PPT 联动架构失败: {ex}", LogHelper.LogType.Error); }
|
||||
}
|
||||
|
||||
private void ToggleSwitchSupportWPS_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
var ppt = SettingsManager.Settings.PowerPointSettings;
|
||||
ppt.IsSupportWPS = CardSupportWPS.IsOn;
|
||||
if (ppt.IsSupportWPS)
|
||||
{
|
||||
if (!ppt.PowerPointSupport)
|
||||
{
|
||||
ppt.PowerPointSupport = true;
|
||||
CardSupportPowerPoint.IsOn = true;
|
||||
if (mw != null)
|
||||
{
|
||||
if (mw.PPTManager == null) mw.InitializePPTManagers();
|
||||
mw.StartPPTMonitoring();
|
||||
}
|
||||
}
|
||||
if (ppt.EnablePowerPointEnhancement)
|
||||
{
|
||||
ppt.EnablePowerPointEnhancement = false;
|
||||
CardPowerPointEnhancement.IsOn = false;
|
||||
mw?.StopPowerPointProcessMonitoring();
|
||||
}
|
||||
}
|
||||
if (mw?.PPTManager != null)
|
||||
{
|
||||
mw.PPTManager.IsSupportWPS = ppt.IsSupportWPS;
|
||||
mw.PPTManager.SkipAnimationsWhenNavigating = ppt.SkipAnimationsWhenGoNext;
|
||||
}
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchEnableWppProcessKill_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.PowerPointSettings.EnableWppProcessKill = CardEnableWppProcessKill.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PPT Flip Buttons
|
||||
|
||||
private void ToggleSwitchShowPPTButton_OnToggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
SettingsManager.Settings.PowerPointSettings.ShowPPTButton = CardShowPPTButton.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
if (mw?.PPTUIManager != null)
|
||||
{
|
||||
mw.PPTUIManager.ShowPPTButton = CardShowPPTButton.IsOn;
|
||||
mw.PPTUIManager.UpdateNavigationPanelsVisibility();
|
||||
}
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
private void ToggleSwitchShowPPTSidebarByDefault_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
SettingsManager.Settings.PowerPointSettings.ShowPPTSidebarByDefault = CardShowPPTSidebarByDefault.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
if (mw != null && mw.BtnPPTSlideShowEnd?.Visibility == Visibility.Visible)
|
||||
mw.UpdatePPTQuickPanelVisibility();
|
||||
}
|
||||
|
||||
private void ToggleSwitchEnablePPTButtonPageClickable_OnToggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.PowerPointSettings.EnablePPTButtonPageClickable = CardEnablePPTButtonPageClickable.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchEnablePPTButtonLongPressPageTurn_OnToggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.PowerPointSettings.EnablePPTButtonLongPressPageTurn = CardEnablePPTButtonLongPressPageTurn.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PPT Button Position & Opacity Sliders
|
||||
|
||||
private void PPTButtonLeftPositionValueSlider_ValueChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
SettingsManager.Settings.PowerPointSettings.PPTLSButtonPosition = (int)PPTButtonLeftPositionValueSlider.Value;
|
||||
mw?.UpdatePPTBtnSlidersStatus();
|
||||
mw?.UpdatePPTUIManagerSettings();
|
||||
_sliderDelayAction.DebounceAction(2000, null, () => SettingsManager.SaveSettingsToFile());
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
private void PPTButtonRightPositionValueSlider_ValueChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
SettingsManager.Settings.PowerPointSettings.PPTRSButtonPosition = (int)PPTButtonRightPositionValueSlider.Value;
|
||||
mw?.UpdatePPTBtnSlidersStatus();
|
||||
mw?.UpdatePPTUIManagerSettings();
|
||||
_sliderDelayAction.DebounceAction(2000, null, () => SettingsManager.SaveSettingsToFile());
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
private void PPTButtonLBPositionValueSlider_ValueChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
SettingsManager.Settings.PowerPointSettings.PPTLBButtonPosition = (int)PPTButtonLBPositionValueSlider.Value;
|
||||
mw?.UpdatePPTBtnSlidersStatus();
|
||||
mw?.UpdatePPTUIManagerSettings();
|
||||
_sliderDelayAction.DebounceAction(2000, null, () => SettingsManager.SaveSettingsToFile());
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
private void PPTButtonRBPositionValueSlider_ValueChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
SettingsManager.Settings.PowerPointSettings.PPTRBButtonPosition = (int)PPTButtonRBPositionValueSlider.Value;
|
||||
mw?.UpdatePPTBtnSlidersStatus();
|
||||
mw?.UpdatePPTUIManagerSettings();
|
||||
_sliderDelayAction.DebounceAction(2000, null, () => SettingsManager.SaveSettingsToFile());
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
private void PPTLSButtonOpacityValueSlider_ValueChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
double roundedValue = Math.Round(PPTLSButtonOpacityValueSlider.Value, 1);
|
||||
PPTLSButtonOpacityValueSlider.ValueChanged -= PPTLSButtonOpacityValueSlider_ValueChanged;
|
||||
PPTLSButtonOpacityValueSlider.Value = roundedValue;
|
||||
PPTLSButtonOpacityValueSlider.ValueChanged += PPTLSButtonOpacityValueSlider_ValueChanged;
|
||||
SettingsManager.Settings.PowerPointSettings.PPTLSButtonOpacity = roundedValue;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
var mw = GetMainWindow();
|
||||
if (mw?.PPTUIManager != null)
|
||||
{
|
||||
mw.PPTUIManager.PPTLSButtonOpacity = roundedValue;
|
||||
mw.PPTUIManager.UpdateNavigationButtonStyles();
|
||||
}
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
private void PPTRSButtonOpacityValueSlider_ValueChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
double roundedValue = Math.Round(PPTRSButtonOpacityValueSlider.Value, 1);
|
||||
PPTRSButtonOpacityValueSlider.ValueChanged -= PPTRSButtonOpacityValueSlider_ValueChanged;
|
||||
PPTRSButtonOpacityValueSlider.Value = roundedValue;
|
||||
PPTRSButtonOpacityValueSlider.ValueChanged += PPTRSButtonOpacityValueSlider_ValueChanged;
|
||||
SettingsManager.Settings.PowerPointSettings.PPTRSButtonOpacity = roundedValue;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
var mw = GetMainWindow();
|
||||
if (mw?.PPTUIManager != null)
|
||||
{
|
||||
mw.PPTUIManager.PPTRSButtonOpacity = roundedValue;
|
||||
mw.PPTUIManager.UpdateNavigationButtonStyles();
|
||||
}
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
private void PPTLBButtonOpacityValueSlider_ValueChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
double roundedValue = Math.Round(PPTLBButtonOpacityValueSlider.Value, 1);
|
||||
PPTLBButtonOpacityValueSlider.ValueChanged -= PPTLBButtonOpacityValueSlider_ValueChanged;
|
||||
PPTLBButtonOpacityValueSlider.Value = roundedValue;
|
||||
PPTLBButtonOpacityValueSlider.ValueChanged += PPTLBButtonOpacityValueSlider_ValueChanged;
|
||||
SettingsManager.Settings.PowerPointSettings.PPTLBButtonOpacity = roundedValue;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
var mw = GetMainWindow();
|
||||
if (mw?.PPTUIManager != null)
|
||||
{
|
||||
mw.PPTUIManager.PPTLBButtonOpacity = roundedValue;
|
||||
mw.PPTUIManager.UpdateNavigationButtonStyles();
|
||||
}
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
private void PPTRBButtonOpacityValueSlider_ValueChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
double roundedValue = Math.Round(PPTRBButtonOpacityValueSlider.Value, 1);
|
||||
PPTRBButtonOpacityValueSlider.ValueChanged -= PPTRBButtonOpacityValueSlider_ValueChanged;
|
||||
PPTRBButtonOpacityValueSlider.Value = roundedValue;
|
||||
PPTRBButtonOpacityValueSlider.ValueChanged += PPTRBButtonOpacityValueSlider_ValueChanged;
|
||||
SettingsManager.Settings.PowerPointSettings.PPTRBButtonOpacity = roundedValue;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
var mw = GetMainWindow();
|
||||
if (mw?.PPTUIManager != null)
|
||||
{
|
||||
mw.PPTUIManager.PPTRBButtonOpacity = roundedValue;
|
||||
mw.PPTUIManager.UpdateNavigationButtonStyles();
|
||||
}
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PPT Button Display Checkboxes
|
||||
|
||||
private void CheckboxEnableLBPPTButton_IsCheckChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
var str = SettingsManager.Settings.PowerPointSettings.PPTButtonsDisplayOption.ToString();
|
||||
char[] c = str.ToCharArray();
|
||||
c[0] = CheckboxEnableLBPPTButton.IsChecked == true ? '2' : '1';
|
||||
SettingsManager.Settings.PowerPointSettings.PPTButtonsDisplayOption = int.Parse(new string(c));
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
if (mw?.PPTUIManager != null && mw.BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
|
||||
{
|
||||
mw.PPTUIManager.PPTButtonsDisplayOption = SettingsManager.Settings.PowerPointSettings.PPTButtonsDisplayOption;
|
||||
mw.PPTUIManager.UpdateNavigationPanelsVisibility();
|
||||
}
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
private void CheckboxEnableRBPPTButton_IsCheckChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
var str = SettingsManager.Settings.PowerPointSettings.PPTButtonsDisplayOption.ToString();
|
||||
char[] c = str.ToCharArray();
|
||||
c[1] = CheckboxEnableRBPPTButton.IsChecked == true ? '2' : '1';
|
||||
SettingsManager.Settings.PowerPointSettings.PPTButtonsDisplayOption = int.Parse(new string(c));
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
if (mw?.PPTUIManager != null && mw.BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
|
||||
{
|
||||
mw.PPTUIManager.PPTButtonsDisplayOption = SettingsManager.Settings.PowerPointSettings.PPTButtonsDisplayOption;
|
||||
mw.PPTUIManager.UpdateNavigationPanelsVisibility();
|
||||
}
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
private void CheckboxEnableLSPPTButton_IsCheckChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
var str = SettingsManager.Settings.PowerPointSettings.PPTButtonsDisplayOption.ToString();
|
||||
char[] c = str.ToCharArray();
|
||||
c[2] = CheckboxEnableLSPPTButton.IsChecked == true ? '2' : '1';
|
||||
SettingsManager.Settings.PowerPointSettings.PPTButtonsDisplayOption = int.Parse(new string(c));
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
if (mw?.PPTUIManager != null && mw.BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
|
||||
{
|
||||
mw.PPTUIManager.PPTButtonsDisplayOption = SettingsManager.Settings.PowerPointSettings.PPTButtonsDisplayOption;
|
||||
mw.PPTUIManager.UpdateNavigationPanelsVisibility();
|
||||
}
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
private void CheckboxEnableRSPPTButton_IsCheckChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
var str = SettingsManager.Settings.PowerPointSettings.PPTButtonsDisplayOption.ToString();
|
||||
char[] c = str.ToCharArray();
|
||||
c[3] = CheckboxEnableRSPPTButton.IsChecked == true ? '2' : '1';
|
||||
SettingsManager.Settings.PowerPointSettings.PPTButtonsDisplayOption = int.Parse(new string(c));
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
if (mw?.PPTUIManager != null && mw.BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
|
||||
{
|
||||
mw.PPTUIManager.PPTButtonsDisplayOption = SettingsManager.Settings.PowerPointSettings.PPTButtonsDisplayOption;
|
||||
mw.PPTUIManager.UpdateNavigationPanelsVisibility();
|
||||
}
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
private void CheckboxSPPTDisplayPage_IsCheckChange(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
var str = SettingsManager.Settings.PowerPointSettings.PPTSButtonsOption.ToString();
|
||||
char[] c = str.ToCharArray();
|
||||
c[0] = CheckboxSPPTDisplayPage.IsChecked == true ? '2' : '1';
|
||||
SettingsManager.Settings.PowerPointSettings.PPTSButtonsOption = int.Parse(new string(c));
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
if (mw?.PPTUIManager != null && mw.BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
|
||||
{
|
||||
mw.PPTUIManager.PPTSButtonsOption = SettingsManager.Settings.PowerPointSettings.PPTSButtonsOption;
|
||||
mw.PPTUIManager.UpdateNavigationButtonStyles();
|
||||
}
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
private void CheckboxSPPTHalfOpacity_IsCheckChange(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
var ppt = SettingsManager.Settings.PowerPointSettings;
|
||||
var str = ppt.PPTSButtonsOption.ToString();
|
||||
char[] c = str.ToCharArray();
|
||||
bool isHalf = CheckboxSPPTHalfOpacity.IsChecked == true;
|
||||
c[1] = isHalf ? '2' : '1';
|
||||
ppt.PPTSButtonsOption = int.Parse(new string(c));
|
||||
if (isHalf)
|
||||
{
|
||||
if (ppt.PPTLSButtonOpacity == 1.0) ppt.PPTLSButtonOpacity = 0.5;
|
||||
if (ppt.PPTRSButtonOpacity == 1.0) ppt.PPTRSButtonOpacity = 0.5;
|
||||
PPTLSButtonOpacityValueSlider.Value = ppt.PPTLSButtonOpacity;
|
||||
PPTRSButtonOpacityValueSlider.Value = ppt.PPTRSButtonOpacity;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ppt.PPTLSButtonOpacity == 0.5) ppt.PPTLSButtonOpacity = 1.0;
|
||||
if (ppt.PPTRSButtonOpacity == 0.5) ppt.PPTRSButtonOpacity = 1.0;
|
||||
PPTLSButtonOpacityValueSlider.Value = ppt.PPTLSButtonOpacity;
|
||||
PPTRSButtonOpacityValueSlider.Value = ppt.PPTRSButtonOpacity;
|
||||
}
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
if (mw?.PPTUIManager != null && mw.BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
|
||||
{
|
||||
mw.PPTUIManager.PPTSButtonsOption = ppt.PPTSButtonsOption;
|
||||
mw.PPTUIManager.PPTLSButtonOpacity = ppt.PPTLSButtonOpacity;
|
||||
mw.PPTUIManager.PPTRSButtonOpacity = ppt.PPTRSButtonOpacity;
|
||||
mw.PPTUIManager.UpdateNavigationButtonStyles();
|
||||
}
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
private void CheckboxSPPTBlackBackground_IsCheckChange(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
var str = SettingsManager.Settings.PowerPointSettings.PPTSButtonsOption.ToString();
|
||||
char[] c = str.ToCharArray();
|
||||
c[2] = CheckboxSPPTBlackBackground.IsChecked == true ? '2' : '1';
|
||||
SettingsManager.Settings.PowerPointSettings.PPTSButtonsOption = int.Parse(new string(c));
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
if (mw?.PPTUIManager != null && mw.BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
|
||||
{
|
||||
mw.PPTUIManager.PPTSButtonsOption = SettingsManager.Settings.PowerPointSettings.PPTSButtonsOption;
|
||||
mw.PPTUIManager.UpdateNavigationButtonStyles();
|
||||
}
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
private void CheckboxBPPTDisplayPage_IsCheckChange(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
var str = SettingsManager.Settings.PowerPointSettings.PPTBButtonsOption.ToString();
|
||||
char[] c = str.ToCharArray();
|
||||
c[0] = CheckboxBPPTDisplayPage.IsChecked == true ? '2' : '1';
|
||||
SettingsManager.Settings.PowerPointSettings.PPTBButtonsOption = int.Parse(new string(c));
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
if (mw?.PPTUIManager != null && mw.BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
|
||||
{
|
||||
mw.PPTUIManager.PPTBButtonsOption = SettingsManager.Settings.PowerPointSettings.PPTBButtonsOption;
|
||||
mw.PPTUIManager.UpdateNavigationButtonStyles();
|
||||
}
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
private void CheckboxBPPTHalfOpacity_IsCheckChange(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
var ppt = SettingsManager.Settings.PowerPointSettings;
|
||||
var str = ppt.PPTBButtonsOption.ToString();
|
||||
char[] c = str.ToCharArray();
|
||||
bool isHalf = CheckboxBPPTHalfOpacity.IsChecked == true;
|
||||
c[1] = isHalf ? '2' : '1';
|
||||
ppt.PPTBButtonsOption = int.Parse(new string(c));
|
||||
if (isHalf)
|
||||
{
|
||||
if (ppt.PPTLBButtonOpacity == 1.0) ppt.PPTLBButtonOpacity = 0.5;
|
||||
if (ppt.PPTRBButtonOpacity == 1.0) ppt.PPTRBButtonOpacity = 0.5;
|
||||
PPTLBButtonOpacityValueSlider.Value = ppt.PPTLBButtonOpacity;
|
||||
PPTRBButtonOpacityValueSlider.Value = ppt.PPTRBButtonOpacity;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ppt.PPTLBButtonOpacity == 0.5) ppt.PPTLBButtonOpacity = 1.0;
|
||||
if (ppt.PPTRBButtonOpacity == 0.5) ppt.PPTRBButtonOpacity = 1.0;
|
||||
PPTLBButtonOpacityValueSlider.Value = ppt.PPTLBButtonOpacity;
|
||||
PPTRBButtonOpacityValueSlider.Value = ppt.PPTRBButtonOpacity;
|
||||
}
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
if (mw?.PPTUIManager != null && mw.BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
|
||||
{
|
||||
mw.PPTUIManager.PPTBButtonsOption = ppt.PPTBButtonsOption;
|
||||
mw.PPTUIManager.PPTLBButtonOpacity = ppt.PPTLBButtonOpacity;
|
||||
mw.PPTUIManager.PPTRBButtonOpacity = ppt.PPTRBButtonOpacity;
|
||||
mw.PPTUIManager.UpdateNavigationButtonStyles();
|
||||
}
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
private void CheckboxBPPTBlackBackground_IsCheckChange(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
var str = SettingsManager.Settings.PowerPointSettings.PPTBButtonsOption.ToString();
|
||||
char[] c = str.ToCharArray();
|
||||
c[2] = CheckboxBPPTBlackBackground.IsChecked == true ? '2' : '1';
|
||||
SettingsManager.Settings.PowerPointSettings.PPTBButtonsOption = int.Parse(new string(c));
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
if (mw?.PPTUIManager != null && mw.BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
|
||||
{
|
||||
mw.PPTUIManager.PPTBButtonsOption = SettingsManager.Settings.PowerPointSettings.PPTBButtonsOption;
|
||||
mw.PPTUIManager.UpdateNavigationButtonStyles();
|
||||
}
|
||||
mw?.UpdatePPTBtnPreview();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PPT SlideShow Entry & Gesture
|
||||
|
||||
private void ToggleSwitchShowCanvasAtNewSlideShow_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.PowerPointSettings.IsShowCanvasAtNewSlideShow = CardShowCanvasAtNewSlideShow.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchEnableTwoFingerGestureInPresentationMode_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.PowerPointSettings.IsEnableTwoFingerGestureInPresentationMode = CardEnableTwoFingerGestureInPresentationMode.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchEnableFingerGestureSlideShowControl_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.PowerPointSettings.IsEnableFingerGestureSlideShowControl = CardEnableFingerGestureSlideShowControl.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchShowGestureButtonInSlideShow_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
SettingsManager.Settings.PowerPointSettings.ShowGestureButtonInSlideShow = CardShowGestureButtonInSlideShow.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
if (mw != null && mw.BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
|
||||
mw.UpdateGestureButtonVisibilityInPPTMode();
|
||||
}
|
||||
|
||||
private void ToggleSwitchEnablePPTTimeCapsule_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
var mw = GetMainWindow();
|
||||
SettingsManager.Settings.PowerPointSettings.EnablePPTTimeCapsule = CardEnablePPTTimeCapsule.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
if (mw != null && mw.BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
|
||||
{
|
||||
mw.UpdatePPTTimeCapsuleVisibility();
|
||||
mw.UpdatePPTQuickPanelVisibility();
|
||||
}
|
||||
}
|
||||
|
||||
private void ComboBoxPPTTimeCapsulePosition_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded || ComboBoxPPTTimeCapsulePosition == null) return;
|
||||
var mw = GetMainWindow();
|
||||
SettingsManager.Settings.PowerPointSettings.PPTTimeCapsulePosition = ComboBoxPPTTimeCapsulePosition.SelectedIndex;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
if (mw != null && mw.BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
|
||||
mw.UpdatePPTTimeCapsulePosition();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PPT Auto Save & Notifications
|
||||
|
||||
private void ToggleSwitchAutoSaveScreenShotInPowerPoint_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.PowerPointSettings.IsAutoSaveScreenShotInPowerPoint = CardAutoSaveScreenShotInPowerPoint.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAutoSaveStrokesInPowerPoint_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.PowerPointSettings.IsAutoSaveStrokesInPowerPoint = CardAutoSaveStrokesInPowerPoint.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchNotifyPreviousPage_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.PowerPointSettings.IsNotifyPreviousPage = CardNotifyPreviousPage.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchAlwaysGoToFirstPageOnReenter_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.PowerPointSettings.IsAlwaysGoToFirstPageOnReenter = CardAlwaysGoToFirstPageOnReenter.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchNotifyHiddenPage_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.PowerPointSettings.IsNotifyHiddenPage = CardNotifyHiddenPage.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchNotifyAutoPlayPresentation_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_isLoaded) return;
|
||||
SettingsManager.Settings.PowerPointSettings.IsNotifyAutoPlayPresentation = CardNotifyAutoPlayPresentation.IsOn;
|
||||
SettingsManager.SaveSettingsToFile();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -186,6 +186,17 @@
|
||||
</ui:NavigationViewItem.MenuItems>
|
||||
</ui:NavigationViewItem>
|
||||
|
||||
<!-- PowerPoint -->
|
||||
<ui:NavigationViewItem
|
||||
x:Name="PowerPointPageItem"
|
||||
Content="PowerPoint"
|
||||
Tag="PowerPointPage"
|
||||
ToolTipService.ToolTip="PowerPoint 设置">
|
||||
<ui:NavigationViewItem.Icon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"/>
|
||||
</ui:NavigationViewItem.Icon>
|
||||
</ui:NavigationViewItem>
|
||||
|
||||
<!-- 更新设置 -->
|
||||
<ui:NavigationViewItem
|
||||
x:Name="UpdatePageItem"
|
||||
@@ -219,6 +230,17 @@
|
||||
</ui:NavigationViewItem.Icon>
|
||||
</ui:NavigationViewItem>
|
||||
|
||||
<!-- 自动化 -->
|
||||
<ui:NavigationViewItem
|
||||
x:Name="AutomationPageItem"
|
||||
Content="自动化"
|
||||
Tag="AutomationPage"
|
||||
ToolTipService.ToolTip="自动化设置">
|
||||
<ui:NavigationViewItem.Icon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Sync}"/>
|
||||
</ui:NavigationViewItem.Icon>
|
||||
</ui:NavigationViewItem>
|
||||
|
||||
<!-- 画板设置 -->
|
||||
<ui:NavigationViewItem
|
||||
x:Name="CanvasPageItem"
|
||||
|
||||
@@ -44,6 +44,8 @@ namespace Ink_Canvas.Windows.SettingsViews
|
||||
{ "UpdatePage", typeof(UpdatePage) },
|
||||
{ "ExperimentalPage", typeof(ExperimentalPage) },
|
||||
{ "AdvancedPage", typeof(AdvancedPage) },
|
||||
{ "AutomationPage", typeof(AutomationPage) },
|
||||
{ "PowerPointPage", typeof(PowerPointPage) },
|
||||
{ "RandomDrawPage", typeof(RandomDrawPage) },
|
||||
{ "CanvasPage", typeof(CanvasPage) },
|
||||
{ "InkRecognitionPage", typeof(InkRecognitionPage) },
|
||||
|
||||
Reference in New Issue
Block a user