代码优化

This commit is contained in:
2026-03-21 16:13:42 +08:00
parent 3934270ed2
commit 74b64bd21f
5 changed files with 20 additions and 25 deletions
+2 -2
View File
@@ -1,8 +1,10 @@
using Hardcodet.Wpf.TaskbarNotification; using Hardcodet.Wpf.TaskbarNotification;
using Ink_Canvas.Helpers; using Ink_Canvas.Helpers;
using Ink_Canvas.Properties;
using iNKORE.UI.WPF.Modern.Controls; using iNKORE.UI.WPF.Modern.Controls;
using Microsoft.Win32; using Microsoft.Win32;
using Newtonsoft.Json; using Newtonsoft.Json;
using Sentry;
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
@@ -18,10 +20,8 @@ using System.Windows.Input;
using System.Windows.Threading; using System.Windows.Threading;
using Application = System.Windows.Application; using Application = System.Windows.Application;
using MessageBox = System.Windows.MessageBox; using MessageBox = System.Windows.MessageBox;
using Ink_Canvas.Properties;
using SplashScreen = Ink_Canvas.Windows.SplashScreen; using SplashScreen = Ink_Canvas.Windows.SplashScreen;
using Timer = System.Threading.Timer; using Timer = System.Threading.Timer;
using Sentry;
namespace Ink_Canvas namespace Ink_Canvas
{ {
-2
View File
@@ -264,7 +264,6 @@ namespace Ink_Canvas.Helpers
public void Enable() public void Enable()
{ {
IsEnabled = true; IsEnabled = true;
LogHelper.WriteLogToFile("墨迹渐隐功能已启用");
} }
/// <summary> /// <summary>
@@ -273,7 +272,6 @@ namespace Ink_Canvas.Helpers
public void Disable() public void Disable()
{ {
IsEnabled = false; IsEnabled = false;
LogHelper.WriteLogToFile("墨迹渐隐功能已禁用");
} }
#endregion #endregion
+1 -1
View File
@@ -605,7 +605,7 @@ namespace Ink_Canvas.Helpers
if (view != null) if (view != null)
{ {
dynamic viewObj = view; dynamic viewObj = view;
CurrentSlide = viewObj.Slide as Slide; CurrentSlide = viewObj.Slide as Slide;
} }
} }
} }
-2
View File
@@ -3535,7 +3535,6 @@ namespace Ink_Canvas
ToggleSwitchInkFadeInPanel2.IsOn = Settings.Canvas.EnableInkFade; ToggleSwitchInkFadeInPanel2.IsOn = Settings.Canvas.EnableInkFade;
} }
LogHelper.WriteLogToFile($"墨迹渐隐功能已{(Settings.Canvas.EnableInkFade ? "" : "")}", LogHelper.LogType.Event);
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -3587,7 +3586,6 @@ namespace Ink_Canvas
ToggleSwitchInkFadeInPanel2.IsOn = Settings.Canvas.EnableInkFade; ToggleSwitchInkFadeInPanel2.IsOn = Settings.Canvas.EnableInkFade;
} }
LogHelper.WriteLogToFile($"批注子面板中墨迹渐隐功能已{(Settings.Canvas.EnableInkFade ? "" : "")}", LogHelper.LogType.Event);
} }
catch (Exception ex) catch (Exception ex)
{ {
-1
View File
@@ -1441,7 +1441,6 @@ namespace Ink_Canvas
if (_eraserAutoSwitchBackTimer != null) if (_eraserAutoSwitchBackTimer != null)
{ {
_eraserAutoSwitchBackTimer.Stop(); _eraserAutoSwitchBackTimer.Stop();
LogHelper.WriteLogToFile("橡皮擦自动切换计时器已停止", LogHelper.LogType.Trace);
} }
} }
catch (Exception ex) catch (Exception ex)