优化代码
This commit is contained in:
@@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.Office.Interop.PowerPoint;
|
|
||||||
|
|
||||||
namespace Ink_Canvas.Helpers
|
namespace Ink_Canvas.Helpers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.Office.Interop.PowerPoint;
|
|
||||||
|
|
||||||
namespace Ink_Canvas.Helpers
|
namespace Ink_Canvas.Helpers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
using Ink_Canvas.Properties;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Ink_Canvas.Properties;
|
|
||||||
|
|
||||||
namespace Ink_Canvas.Helpers
|
namespace Ink_Canvas.Helpers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ using Microsoft.Office.Interop.PowerPoint;
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows.Ink;
|
using System.Windows.Ink;
|
||||||
|
|
||||||
namespace Ink_Canvas.Helpers
|
namespace Ink_Canvas.Helpers
|
||||||
@@ -455,7 +453,8 @@ namespace Ink_Canvas.Helpers
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < _memoryStreams.Length; i++)
|
for (int i = 0; i < _memoryStreams.Length; i++)
|
||||||
{
|
{
|
||||||
try { _memoryStreams[i]?.Dispose(); } catch (Exception ex) { LogHelper.WriteLogToFile($"释放内存流 {i} 失败: {ex}", LogHelper.LogType.Warning); }
|
try { _memoryStreams[i]?.Dispose(); }
|
||||||
|
catch (Exception ex) { LogHelper.WriteLogToFile($"释放内存流 {i} 失败: {ex}", LogHelper.LogType.Warning); }
|
||||||
finally { _memoryStreams[i] = null; }
|
finally { _memoryStreams[i] = null; }
|
||||||
}
|
}
|
||||||
_memoryStreams = new MemoryStream[_maxSlides + 2];
|
_memoryStreams = new MemoryStream[_maxSlides + 2];
|
||||||
@@ -544,7 +543,8 @@ namespace Ink_Canvas.Helpers
|
|||||||
if (_memoryStreams[i] != null)
|
if (_memoryStreams[i] != null)
|
||||||
{
|
{
|
||||||
long len = _memoryStreams[i].Length;
|
long len = _memoryStreams[i].Length;
|
||||||
try { _memoryStreams[i].Dispose(); freed += len; cleaned++; } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex); }
|
try { _memoryStreams[i].Dispose(); freed += len; cleaned++; }
|
||||||
|
catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex); }
|
||||||
finally { _memoryStreams[i] = null; }
|
finally { _memoryStreams[i] = null; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
using Microsoft.Office.Interop.PowerPoint;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Runtime.InteropServices.ComTypes;
|
using System.Runtime.InteropServices.ComTypes;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
|
||||||
|
|
||||||
namespace Ink_Canvas.Helpers
|
namespace Ink_Canvas.Helpers
|
||||||
{
|
{
|
||||||
@@ -426,21 +423,21 @@ namespace Ink_Canvas.Helpers
|
|||||||
|
|
||||||
if (fgPid == sswPid) return true;
|
if (fgPid == sswPid) return true;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
using (Process fgProc = Process.GetProcessById((int)fgPid))
|
||||||
|
using (Process appProc = Process.GetProcessById((int)sswPid))
|
||||||
{
|
{
|
||||||
using (Process fgProc = Process.GetProcessById((int)fgPid))
|
string fgName = fgProc.ProcessName.ToLower();
|
||||||
using (Process appProc = Process.GetProcessById((int)sswPid))
|
string appName = appProc.ProcessName.ToLower();
|
||||||
{
|
|
||||||
string fgName = fgProc.ProcessName.ToLower();
|
|
||||||
string appName = appProc.ProcessName.ToLower();
|
|
||||||
|
|
||||||
if (fgName.StartsWith("wps") && appName.StartsWith("wpp"))
|
if (fgName.StartsWith("wps") && appName.StartsWith("wpp"))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex); }
|
}
|
||||||
|
catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex); }
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ using Microsoft.Win32.SafeHandles;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
|
|||||||
+146
-149
@@ -3,13 +3,10 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using System.Windows.Threading;
|
|
||||||
using Application = System.Windows.Application;
|
|
||||||
using Timer = System.Timers.Timer;
|
using Timer = System.Timers.Timer;
|
||||||
|
|
||||||
namespace Ink_Canvas.Helpers
|
namespace Ink_Canvas.Helpers
|
||||||
@@ -323,10 +320,10 @@ namespace Ink_Canvas.Helpers
|
|||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogToFile("成功绑定!", LogHelper.LogType.Trace);
|
LogHelper.WriteLogToFile("成功绑定!", LogHelper.LogType.Trace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogToFile($"绑定失败: {ex.Message}", LogHelper.LogType.Warning);
|
LogHelper.WriteLogToFile($"绑定失败: {ex.Message}", LogHelper.LogType.Warning);
|
||||||
DisconnectFromPPT();
|
DisconnectFromPPT();
|
||||||
}
|
}
|
||||||
@@ -399,9 +396,9 @@ namespace Ink_Canvas.Helpers
|
|||||||
LogHelper.WriteLogToFile($"检查演示文稿状态COM异常: {comEx.Message} (HR: 0x{hr:X8})", LogHelper.LogType.Warning);
|
LogHelper.WriteLogToFile($"检查演示文稿状态COM异常: {comEx.Message} (HR: 0x{hr:X8})", LogHelper.LogType.Warning);
|
||||||
DisconnectFromPPT();
|
DisconnectFromPPT();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogToFile($"检查演示文稿状态失败: {ex.Message}", LogHelper.LogType.Warning);
|
LogHelper.WriteLogToFile($"检查演示文稿状态失败: {ex.Message}", LogHelper.LogType.Warning);
|
||||||
DisconnectFromPPT();
|
DisconnectFromPPT();
|
||||||
continue;
|
continue;
|
||||||
@@ -763,14 +760,14 @@ namespace Ink_Canvas.Helpers
|
|||||||
{
|
{
|
||||||
// COM对象已失效,断开连接
|
// COM对象已失效,断开连接
|
||||||
LogHelper.WriteLogToFile("检测到COM对象失效,断开连接", LogHelper.LogType.Trace);
|
LogHelper.WriteLogToFile("检测到COM对象失效,断开连接", LogHelper.LogType.Trace);
|
||||||
DisconnectFromPPT();
|
DisconnectFromPPT();
|
||||||
}
|
}
|
||||||
catch (COMException comEx)
|
catch (COMException comEx)
|
||||||
{
|
{
|
||||||
// COM异常,记录并断开连接
|
// COM异常,记录并断开连接
|
||||||
var hr = (uint)comEx.HResult;
|
var hr = (uint)comEx.HResult;
|
||||||
LogHelper.WriteLogToFile($"PPT连接检查COM异常: {comEx.Message} (HR: 0x{hr:X8})", LogHelper.LogType.Warning);
|
LogHelper.WriteLogToFile($"PPT连接检查COM异常: {comEx.Message} (HR: 0x{hr:X8})", LogHelper.LogType.Warning);
|
||||||
DisconnectFromPPT();
|
DisconnectFromPPT();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -838,9 +835,9 @@ namespace Ink_Canvas.Helpers
|
|||||||
LogHelper.WriteLogToFile($"检查演示文稿状态COM异常: {comEx.Message} (HR: 0x{hr:X8})", LogHelper.LogType.Warning);
|
LogHelper.WriteLogToFile($"检查演示文稿状态COM异常: {comEx.Message} (HR: 0x{hr:X8})", LogHelper.LogType.Warning);
|
||||||
DisconnectFromPPT();
|
DisconnectFromPPT();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogToFile($"检查演示文稿状态失败: {ex.Message},继续使用轮询模式", LogHelper.LogType.Warning);
|
LogHelper.WriteLogToFile($"检查演示文稿状态失败: {ex.Message},继续使用轮询模式", LogHelper.LogType.Warning);
|
||||||
activePresentation = null;
|
activePresentation = null;
|
||||||
}
|
}
|
||||||
@@ -856,9 +853,9 @@ namespace Ink_Canvas.Helpers
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (activePresentation == null)
|
if (activePresentation == null)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
activePresentation = PPTApplication.ActivePresentation;
|
activePresentation = PPTApplication.ActivePresentation;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -968,9 +965,9 @@ namespace Ink_Canvas.Helpers
|
|||||||
{
|
{
|
||||||
LogHelper.WriteLogToFile($"轮询模式检测到页码变化: {_lastPolledSlideNumber} -> {currentPage},触发事件", LogHelper.LogType.Trace);
|
LogHelper.WriteLogToFile($"轮询模式检测到页码变化: {_lastPolledSlideNumber} -> {currentPage},触发事件", LogHelper.LogType.Trace);
|
||||||
SlideShowNextSlide?.Invoke(_pptSlideShowWindow);
|
SlideShowNextSlide?.Invoke(_pptSlideShowWindow);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogToFile($"触发轮询模式幻灯片切换事件失败: {ex.Message}", LogHelper.LogType.Warning);
|
LogHelper.WriteLogToFile($"触发轮询模式幻灯片切换事件失败: {ex.Message}", LogHelper.LogType.Warning);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1001,9 +998,9 @@ namespace Ink_Canvas.Helpers
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_polling != 0)
|
if (_polling != 0)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
int currentPage = GetCurrentSlideIndex(_pptSlideShowWindow);
|
int currentPage = GetCurrentSlideIndex(_pptSlideShowWindow);
|
||||||
|
|
||||||
if (_lastPolledSlideNumber != -1 && currentPage != _lastPolledSlideNumber)
|
if (_lastPolledSlideNumber != -1 && currentPage != _lastPolledSlideNumber)
|
||||||
@@ -1123,8 +1120,8 @@ namespace Ink_Canvas.Helpers
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (pptApp != null)
|
if (pptApp != null)
|
||||||
{
|
{
|
||||||
PPTApplication = pptApp;
|
PPTApplication = pptApp;
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -1218,7 +1215,7 @@ namespace Ink_Canvas.Helpers
|
|||||||
|
|
||||||
_bindingEvents = true;
|
_bindingEvents = true;
|
||||||
|
|
||||||
LogHelper.WriteLogToFile("PPT事件注册成功", LogHelper.LogType.Trace);
|
LogHelper.WriteLogToFile("PPT事件注册成功", LogHelper.LogType.Trace);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1226,9 +1223,9 @@ namespace Ink_Canvas.Helpers
|
|||||||
_forcePolling = true;
|
_forcePolling = true;
|
||||||
LogHelper.WriteLogToFile("无法转换为强类型Application,使用轮询模式", LogHelper.LogType.Trace);
|
LogHelper.WriteLogToFile("无法转换为强类型Application,使用轮询模式", LogHelper.LogType.Trace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_bindingEvents = false;
|
_bindingEvents = false;
|
||||||
_forcePolling = true;
|
_forcePolling = true;
|
||||||
LogHelper.WriteLogToFile($"事件注册失败: {ex.Message},使用轮询模式", LogHelper.LogType.Trace);
|
LogHelper.WriteLogToFile($"事件注册失败: {ex.Message},使用轮询模式", LogHelper.LogType.Trace);
|
||||||
@@ -1252,10 +1249,10 @@ namespace Ink_Canvas.Helpers
|
|||||||
|
|
||||||
if (_pptActivePresentation != null)
|
if (_pptActivePresentation != null)
|
||||||
{
|
{
|
||||||
UpdateCurrentPresentationInfo();
|
UpdateCurrentPresentationInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
PPTConnectionChanged?.Invoke(true);
|
PPTConnectionChanged?.Invoke(true);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1335,9 +1332,9 @@ namespace Ink_Canvas.Helpers
|
|||||||
app.SlideShowEnd -= new EApplication_SlideShowEndEventHandler(OnSlideShowEndForComEvent);
|
app.SlideShowEnd -= new EApplication_SlideShowEndEventHandler(OnSlideShowEndForComEvent);
|
||||||
app.PresentationBeforeClose -= new EApplication_PresentationBeforeCloseEventHandler(OnPresentationBeforeClose);
|
app.PresentationBeforeClose -= new EApplication_PresentationBeforeCloseEventHandler(OnPresentationBeforeClose);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogToFile($"取消PPT事件注册失败: {ex.Message}", LogHelper.LogType.Trace);
|
LogHelper.WriteLogToFile($"取消PPT事件注册失败: {ex.Message}", LogHelper.LogType.Trace);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1581,28 +1578,28 @@ namespace Ink_Canvas.Helpers
|
|||||||
|
|
||||||
if (CurrentSlides != null)
|
if (CurrentSlides != null)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
|
||||||
var slideCount = CurrentSlides.Count;
|
|
||||||
if (slideCount > 0)
|
|
||||||
{
|
{
|
||||||
SlidesCount = slideCount;
|
var slideCount = CurrentSlides.Count;
|
||||||
|
if (slideCount > 0)
|
||||||
|
{
|
||||||
|
SlidesCount = slideCount;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SlidesCount = 0;
|
||||||
|
LogHelper.WriteLogToFile("PPT演示文稿页数为0,可能为空演示文稿", LogHelper.LogType.Warning);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
catch (COMException comEx)
|
||||||
{
|
{
|
||||||
|
var hr = (uint)comEx.HResult;
|
||||||
SlidesCount = 0;
|
SlidesCount = 0;
|
||||||
LogHelper.WriteLogToFile("PPT演示文稿页数为0,可能为空演示文稿", LogHelper.LogType.Warning);
|
LogHelper.WriteLogToFile($"读取PPT页数失败: {comEx.Message} (HR: 0x{hr:X8})", LogHelper.LogType.Warning);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch (COMException comEx)
|
|
||||||
{
|
|
||||||
var hr = (uint)comEx.HResult;
|
|
||||||
SlidesCount = 0;
|
|
||||||
LogHelper.WriteLogToFile($"读取PPT页数失败: {comEx.Message} (HR: 0x{hr:X8})", LogHelper.LogType.Warning);
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (IsInSlideShow && _pptSlideShowWindow != null)
|
if (IsInSlideShow && _pptSlideShowWindow != null)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -1618,57 +1615,57 @@ namespace Ink_Canvas.Helpers
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogToFile($"获取SlideShowWindow的Slide失败: {ex.Message}", LogHelper.LogType.Trace);
|
LogHelper.WriteLogToFile($"获取SlideShowWindow的Slide失败: {ex.Message}", LogHelper.LogType.Trace);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
else
|
|
||||||
{
|
|
||||||
activeWindow = PPTApplication.ActiveWindow;
|
|
||||||
if (activeWindow != null)
|
|
||||||
{
|
{
|
||||||
dynamic aw = activeWindow;
|
activeWindow = PPTApplication.ActiveWindow;
|
||||||
selection = aw.Selection;
|
if (activeWindow != null)
|
||||||
if (selection != null)
|
|
||||||
{
|
{
|
||||||
dynamic sel = selection;
|
dynamic aw = activeWindow;
|
||||||
slideRange = sel.SlideRange;
|
selection = aw.Selection;
|
||||||
if (slideRange != null)
|
if (selection != null)
|
||||||
{
|
{
|
||||||
dynamic sr = slideRange;
|
dynamic sel = selection;
|
||||||
int slideNumber = sr.SlideNumber;
|
slideRange = sel.SlideRange;
|
||||||
if (slideNumber > 0 && slideNumber <= SlidesCount)
|
if (slideRange != null)
|
||||||
{
|
{
|
||||||
CurrentSlide = CurrentSlides[slideNumber];
|
dynamic sr = slideRange;
|
||||||
|
int slideNumber = sr.SlideNumber;
|
||||||
|
if (slideNumber > 0 && slideNumber <= SlidesCount)
|
||||||
|
{
|
||||||
|
CurrentSlide = CurrentSlides[slideNumber];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CurrentSlide == null && SlidesCount > 0)
|
||||||
|
{
|
||||||
|
CurrentSlide = CurrentSlides[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (COMException comEx)
|
||||||
|
{
|
||||||
|
var hr = (uint)comEx.HResult;
|
||||||
|
if (hr != 0x8001010E && hr != 0x80004005)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogToFile($"获取当前幻灯片失败: {comEx.Message}", LogHelper.LogType.Warning);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CurrentSlide == null && SlidesCount > 0)
|
if (SlidesCount > 0)
|
||||||
{
|
{
|
||||||
CurrentSlide = CurrentSlides[1];
|
CurrentSlide = CurrentSlides[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (COMException comEx)
|
else
|
||||||
{
|
{
|
||||||
var hr = (uint)comEx.HResult;
|
CurrentPresentation = null;
|
||||||
if (hr != 0x8001010E && hr != 0x80004005)
|
CurrentSlides = null;
|
||||||
{
|
CurrentSlide = null;
|
||||||
LogHelper.WriteLogToFile($"获取当前幻灯片失败: {comEx.Message}", LogHelper.LogType.Warning);
|
SlidesCount = 0;
|
||||||
}
|
|
||||||
|
|
||||||
if (SlidesCount > 0)
|
|
||||||
{
|
|
||||||
CurrentSlide = CurrentSlides[1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CurrentPresentation = null;
|
|
||||||
CurrentSlides = null;
|
|
||||||
CurrentSlide = null;
|
|
||||||
SlidesCount = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2000,46 +1997,46 @@ namespace Ink_Canvas.Helpers
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
object slideShowWindows = PPTApplication.SlideShowWindows;
|
object slideShowWindows = PPTApplication.SlideShowWindows;
|
||||||
if (slideShowWindows != null)
|
if (slideShowWindows != null)
|
||||||
{
|
{
|
||||||
dynamic ssw = slideShowWindows;
|
dynamic ssw = slideShowWindows;
|
||||||
object slideShowWindow = ssw[1];
|
object slideShowWindow = ssw[1];
|
||||||
if (slideShowWindow != null)
|
if (slideShowWindow != null)
|
||||||
{
|
{
|
||||||
dynamic sswObj = slideShowWindow;
|
dynamic sswObj = slideShowWindow;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
sswObj.Activate();
|
sswObj.Activate();
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
object view = sswObj.View;
|
object view = sswObj.View;
|
||||||
if (view != null)
|
if (view != null)
|
||||||
{
|
{
|
||||||
dynamic viewObj = view;
|
dynamic viewObj = view;
|
||||||
viewObj.Next();
|
viewObj.Next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
SafeReleaseComObject(slideShowWindow);
|
SafeReleaseComObject(slideShowWindow);
|
||||||
}
|
}
|
||||||
SafeReleaseComObject(slideShowWindows);
|
SafeReleaseComObject(slideShowWindows);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (COMException comEx)
|
catch (COMException comEx)
|
||||||
{
|
{
|
||||||
var hr = (uint)comEx.HResult;
|
var hr = (uint)comEx.HResult;
|
||||||
if (hr == 0x8001010E || hr == 0x80004005)
|
if (hr == 0x8001010E || hr == 0x80004005)
|
||||||
{
|
{
|
||||||
DisconnectFromPPT();
|
DisconnectFromPPT();
|
||||||
}
|
}
|
||||||
LogHelper.WriteLogToFile($"切换到下一页失败: {comEx.Message}", LogHelper.LogType.Error);
|
LogHelper.WriteLogToFile($"切换到下一页失败: {comEx.Message}", LogHelper.LogType.Error);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogToFile($"切换到下一页失败: {ex}", LogHelper.LogType.Error);
|
LogHelper.WriteLogToFile($"切换到下一页失败: {ex}", LogHelper.LogType.Error);
|
||||||
}
|
}
|
||||||
}).Start();
|
}).Start();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -2063,46 +2060,46 @@ namespace Ink_Canvas.Helpers
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
object slideShowWindows = PPTApplication.SlideShowWindows;
|
object slideShowWindows = PPTApplication.SlideShowWindows;
|
||||||
if (slideShowWindows != null)
|
if (slideShowWindows != null)
|
||||||
{
|
{
|
||||||
dynamic ssw = slideShowWindows;
|
dynamic ssw = slideShowWindows;
|
||||||
object slideShowWindow = ssw[1];
|
object slideShowWindow = ssw[1];
|
||||||
if (slideShowWindow != null)
|
if (slideShowWindow != null)
|
||||||
{
|
{
|
||||||
dynamic sswObj = slideShowWindow;
|
dynamic sswObj = slideShowWindow;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
sswObj.Activate();
|
sswObj.Activate();
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
object view = sswObj.View;
|
object view = sswObj.View;
|
||||||
if (view != null)
|
if (view != null)
|
||||||
{
|
{
|
||||||
dynamic viewObj = view;
|
dynamic viewObj = view;
|
||||||
viewObj.Previous();
|
viewObj.Previous();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
SafeReleaseComObject(slideShowWindow);
|
SafeReleaseComObject(slideShowWindow);
|
||||||
}
|
}
|
||||||
SafeReleaseComObject(slideShowWindows);
|
SafeReleaseComObject(slideShowWindows);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (COMException comEx)
|
catch (COMException comEx)
|
||||||
{
|
{
|
||||||
var hr = (uint)comEx.HResult;
|
var hr = (uint)comEx.HResult;
|
||||||
if (hr == 0x8001010E || hr == 0x80004005)
|
if (hr == 0x8001010E || hr == 0x80004005)
|
||||||
{
|
{
|
||||||
DisconnectFromPPT();
|
DisconnectFromPPT();
|
||||||
}
|
}
|
||||||
LogHelper.WriteLogToFile($"切换到上一页失败: {comEx.Message}", LogHelper.LogType.Error);
|
LogHelper.WriteLogToFile($"切换到上一页失败: {comEx.Message}", LogHelper.LogType.Error);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogToFile($"切换到上一页失败: {ex}", LogHelper.LogType.Error);
|
LogHelper.WriteLogToFile($"切换到上一页失败: {ex}", LogHelper.LogType.Error);
|
||||||
}
|
}
|
||||||
}).Start();
|
}).Start();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -2327,9 +2324,9 @@ namespace Ink_Canvas.Helpers
|
|||||||
|
|
||||||
dynamic ssw = slideShowWindow;
|
dynamic ssw = slideShowWindow;
|
||||||
view = ssw.View;
|
view = ssw.View;
|
||||||
if (view != null)
|
if (view != null)
|
||||||
{
|
{
|
||||||
dynamic viewObj = view;
|
dynamic viewObj = view;
|
||||||
slide = viewObj.Slide;
|
slide = viewObj.Slide;
|
||||||
if (slide != null)
|
if (slide != null)
|
||||||
{
|
{
|
||||||
@@ -2885,8 +2882,8 @@ namespace Ink_Canvas.Helpers
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Marshal.ReleaseComObject(PPTApplication);
|
Marshal.ReleaseComObject(PPTApplication);
|
||||||
PPTApplication = null;
|
PPTApplication = null;
|
||||||
LogHelper.WriteLogToFile("已释放pptApp对象", LogHelper.LogType.Trace);
|
LogHelper.WriteLogToFile("已释放pptApp对象", LogHelper.LogType.Trace);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
|
using iNKORE.UI.WPF.Modern.Controls;
|
||||||
using System;
|
using System;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using Ink_Canvas.Windows;
|
using MessageBox = iNKORE.UI.WPF.Modern.Controls.MessageBox;
|
||||||
using iNKORE.UI.WPF.Modern.Controls;
|
|
||||||
using MessageBox=iNKORE.UI.WPF.Modern.Controls.MessageBox;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Ink_Canvas.Helpers
|
namespace Ink_Canvas.Helpers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
|
using Sentry;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Sentry;
|
|
||||||
using Sentry.Protocol;
|
|
||||||
|
|
||||||
namespace Ink_Canvas.Helpers
|
namespace Ink_Canvas.Helpers
|
||||||
{
|
{
|
||||||
@@ -146,7 +145,7 @@ namespace Ink_Canvas.Helpers
|
|||||||
evt.SetTag("update_channel", settings.Startup.UpdateChannel.ToString());
|
evt.SetTag("update_channel", settings.Startup.UpdateChannel.ToString());
|
||||||
evt.SetTag("app_version", Assembly.GetExecutingAssembly().GetName().Version.ToString());
|
evt.SetTag("app_version", Assembly.GetExecutingAssembly().GetName().Version.ToString());
|
||||||
evt.SetTag("os_version", Environment.OSVersion.VersionString);
|
evt.SetTag("os_version", Environment.OSVersion.VersionString);
|
||||||
evt.SetExtra("telemetry_data", telemetryData);
|
evt.SetExtra("telemetry_data", telemetryData);
|
||||||
|
|
||||||
if (crashFiles != null)
|
if (crashFiles != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Ink_Canvas.Helpers
|
namespace Ink_Canvas.Helpers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Ink_Canvas.Helpers
|
namespace Ink_Canvas.Helpers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Security;
|
|
||||||
|
|
||||||
namespace Ink_Canvas.Helpers
|
namespace Ink_Canvas.Helpers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ using System.Linq;
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows;
|
|
||||||
|
|
||||||
namespace Ink_Canvas.Helpers
|
namespace Ink_Canvas.Helpers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using Ink_Canvas.Helpers;
|
using Ink_Canvas.Helpers;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ using System.Threading.Tasks;
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Controls.Primitives;
|
using System.Windows.Controls.Primitives;
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Windows.Ink;
|
using System.Windows.Ink;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Interop;
|
using System.Windows.Interop;
|
||||||
|
|||||||
@@ -593,22 +593,22 @@ namespace Ink_Canvas
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 创建ZIP文件
|
// 创建ZIP文件
|
||||||
if (File.Exists(zipFileName))
|
if (File.Exists(zipFileName))
|
||||||
File.Delete(zipFileName);
|
File.Delete(zipFileName);
|
||||||
|
|
||||||
ZipFile.CreateFromDirectory(tempDir, zipFileName);
|
ZipFile.CreateFromDirectory(tempDir, zipFileName);
|
||||||
|
|
||||||
// 异步上传ZIP文件到Dlass
|
// 异步上传ZIP文件到Dlass
|
||||||
_ = Task.Run(async () =>
|
_ = Task.Run(async () =>
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
await Helpers.UploadHelper.UploadFileAsync(zipFileName);
|
try
|
||||||
}
|
{
|
||||||
catch (Exception)
|
await Helpers.UploadHelper.UploadFileAsync(zipFileName);
|
||||||
{
|
}
|
||||||
}
|
catch (Exception)
|
||||||
});
|
{
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (newNotice)
|
if (newNotice)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using Ink_Canvas.Helpers;
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
@@ -6,9 +7,8 @@ using System.IO;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using System.Windows.Ink;
|
using System.Windows.Ink;
|
||||||
using Ink_Canvas.Helpers;
|
using System.Windows.Media.Imaging;
|
||||||
|
|
||||||
namespace Ink_Canvas
|
namespace Ink_Canvas
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1025,8 +1025,8 @@ namespace Ink_Canvas
|
|||||||
{
|
{
|
||||||
// 四个边选择点,向外扩展8像素
|
// 四个边选择点,向外扩展8像素
|
||||||
TopHandle.Margin = new Thickness(bounds.Left + bounds.Width / 2 - 4, bounds.Top - 12, 0, 0);
|
TopHandle.Margin = new Thickness(bounds.Left + bounds.Width / 2 - 4, bounds.Top - 12, 0, 0);
|
||||||
BottomHandle.Margin = new Thickness(bounds.Left + bounds.Width / 2 - 4, bounds.Bottom + 4 , 0, 0);
|
BottomHandle.Margin = new Thickness(bounds.Left + bounds.Width / 2 - 4, bounds.Bottom + 4, 0, 0);
|
||||||
LeftHandle.Margin = new Thickness(bounds.Left - 12 , bounds.Top + bounds.Height / 2 - 4, 0, 0);
|
LeftHandle.Margin = new Thickness(bounds.Left - 12, bounds.Top + bounds.Height / 2 - 4, 0, 0);
|
||||||
RightHandle.Margin = new Thickness(bounds.Right + 4, bounds.Top + bounds.Height / 2 - 4, 0, 0);
|
RightHandle.Margin = new Thickness(bounds.Right + 4, bounds.Top + bounds.Height / 2 - 4, 0, 0);
|
||||||
|
|
||||||
// 四个角选择点,完全位于选择框外部
|
// 四个角选择点,完全位于选择框外部
|
||||||
|
|||||||
@@ -1027,7 +1027,8 @@ namespace Ink_Canvas
|
|||||||
var windowTitle = ForegroundWindowInfo.WindowTitle();
|
var windowTitle = ForegroundWindowInfo.WindowTitle();
|
||||||
|
|
||||||
Thickness currentMargin = new Thickness();
|
Thickness currentMargin = new Thickness();
|
||||||
Dispatcher.Invoke(() => {
|
Dispatcher.Invoke(() =>
|
||||||
|
{
|
||||||
currentMargin = ViewboxFloatingBar.Margin;
|
currentMargin = ViewboxFloatingBar.Margin;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Ink;
|
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
using Ink_Canvas.Helpers;
|
using Ink_Canvas.Helpers;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
namespace Ink_Canvas
|
namespace Ink_Canvas
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Controls.Primitives;
|
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
using Ink_Canvas.Properties;
|
||||||
using System;
|
using System;
|
||||||
using System.Windows.Markup;
|
using System.Windows.Markup;
|
||||||
using Ink_Canvas.Properties;
|
|
||||||
|
|
||||||
namespace Ink_Canvas.MarkupExtensions
|
namespace Ink_Canvas.MarkupExtensions
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ namespace Ink_Canvas
|
|||||||
[JsonProperty("brushAutoRestoreColor")]
|
[JsonProperty("brushAutoRestoreColor")]
|
||||||
public string BrushAutoRestoreColor { get; set; } = "#FFFF0000";
|
public string BrushAutoRestoreColor { get; set; } = "#FFFF0000";
|
||||||
[JsonProperty("brushAutoRestoreWidth")]
|
[JsonProperty("brushAutoRestoreWidth")]
|
||||||
public double BrushAutoRestoreWidth { get; set; } =5;
|
public double BrushAutoRestoreWidth { get; set; } = 5;
|
||||||
[JsonProperty("brushAutoRestoreAlpha")]
|
[JsonProperty("brushAutoRestoreAlpha")]
|
||||||
public int BrushAutoRestoreAlpha { get; set; } = 255;
|
public int BrushAutoRestoreAlpha { get; set; } = 255;
|
||||||
[JsonProperty("enableEraserAutoSwitchBack")]
|
[JsonProperty("enableEraserAutoSwitchBack")]
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ using System.Threading.Tasks;
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using MessageBox = iNKORE.UI.WPF.Modern.Controls.MessageBox;
|
using MessageBox = iNKORE.UI.WPF.Modern.Controls.MessageBox;
|
||||||
using ui = iNKORE.UI.WPF.Modern.Controls;
|
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows
|
namespace Ink_Canvas.Windows
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
using Ink_Canvas.Helpers;
|
using Ink_Canvas.Helpers;
|
||||||
|
using Microsoft.Win32;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
@@ -12,8 +14,6 @@ using System.Windows.Media;
|
|||||||
using System.Windows.Media.Animation;
|
using System.Windows.Media.Animation;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
using Microsoft.Win32;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using SystemEvents = Microsoft.Win32.SystemEvents;
|
using SystemEvents = Microsoft.Win32.SystemEvents;
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows
|
namespace Ink_Canvas.Windows
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
using Ink_Canvas.Helpers;
|
using Ink_Canvas.Helpers;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
@@ -12,7 +8,6 @@ using System.Windows.Input;
|
|||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Animation;
|
using System.Windows.Media.Animation;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
using File = System.IO.File;
|
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows
|
namespace Ink_Canvas.Windows
|
||||||
{
|
{
|
||||||
@@ -160,46 +155,46 @@ namespace Ink_Canvas.Windows
|
|||||||
DateTime now = DateTime.Now;
|
DateTime now = DateTime.Now;
|
||||||
|
|
||||||
// 检查小时是否改变
|
// 检查小时是否改变
|
||||||
if (lastTime != DateTime.MinValue && lastTime.Hour != now.Hour)
|
if (lastTime != DateTime.MinValue && lastTime.Hour != now.Hour)
|
||||||
{
|
{
|
||||||
// 先更新数字内容
|
// 先更新数字内容
|
||||||
SetDigitDisplay("Hour1Display", now.Hour / 10);
|
SetDigitDisplay("Hour1Display", now.Hour / 10);
|
||||||
SetDigitDisplay("Hour2Display", now.Hour % 10);
|
SetDigitDisplay("Hour2Display", now.Hour % 10);
|
||||||
|
|
||||||
// 重置Transform位置到上方
|
// 重置Transform位置到上方
|
||||||
HourContentTransform.Y = -40;
|
HourContentTransform.Y = -40;
|
||||||
HourPanel.Opacity = 0;
|
HourPanel.Opacity = 0;
|
||||||
|
|
||||||
// 播放小时滚动动画:从上方滚入
|
// 播放小时滚动动画:从上方滚入
|
||||||
PlayHourScrollAnimation();
|
PlayHourScrollAnimation();
|
||||||
}
|
}
|
||||||
else if (lastTime == DateTime.MinValue)
|
else if (lastTime == DateTime.MinValue)
|
||||||
{
|
{
|
||||||
// 首次加载,直接更新显示
|
// 首次加载,直接更新显示
|
||||||
SetDigitDisplay("Hour1Display", now.Hour / 10);
|
SetDigitDisplay("Hour1Display", now.Hour / 10);
|
||||||
SetDigitDisplay("Hour2Display", now.Hour % 10);
|
SetDigitDisplay("Hour2Display", now.Hour % 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查分钟是否改变
|
// 检查分钟是否改变
|
||||||
if (lastTime != DateTime.MinValue && lastTime.Minute != now.Minute)
|
if (lastTime != DateTime.MinValue && lastTime.Minute != now.Minute)
|
||||||
{
|
{
|
||||||
// 先更新数字内容
|
// 先更新数字内容
|
||||||
SetDigitDisplay("Minute1Display", now.Minute / 10);
|
SetDigitDisplay("Minute1Display", now.Minute / 10);
|
||||||
SetDigitDisplay("Minute2Display", now.Minute % 10);
|
SetDigitDisplay("Minute2Display", now.Minute % 10);
|
||||||
|
|
||||||
// 重置Transform位置到上方
|
// 重置Transform位置到上方
|
||||||
MinuteContentTransform.Y = -40;
|
MinuteContentTransform.Y = -40;
|
||||||
MinutePanel.Opacity = 0;
|
MinutePanel.Opacity = 0;
|
||||||
|
|
||||||
// 播放分钟滚动动画:从上方滚入
|
// 播放分钟滚动动画:从上方滚入
|
||||||
PlayMinuteScrollAnimation();
|
PlayMinuteScrollAnimation();
|
||||||
}
|
}
|
||||||
else if (lastTime == DateTime.MinValue)
|
else if (lastTime == DateTime.MinValue)
|
||||||
{
|
{
|
||||||
// 首次加载,直接更新显示
|
// 首次加载,直接更新显示
|
||||||
SetDigitDisplay("Minute1Display", now.Minute / 10);
|
SetDigitDisplay("Minute1Display", now.Minute / 10);
|
||||||
SetDigitDisplay("Minute2Display", now.Minute % 10);
|
SetDigitDisplay("Minute2Display", now.Minute % 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
lastTime = now;
|
lastTime = now;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using iNKORE.UI.WPF.Helpers;
|
|
||||||
using Ink_Canvas.Helpers;
|
using Ink_Canvas.Helpers;
|
||||||
|
using iNKORE.UI.WPF.Helpers;
|
||||||
using OSVersionExtension;
|
using OSVersionExtension;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -8,7 +8,6 @@ using System.IO;
|
|||||||
using System.Management;
|
using System.Management;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
@@ -16,7 +15,6 @@ using System.Windows.Controls.Primitives;
|
|||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using Microsoft.Win32;
|
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews
|
namespace Ink_Canvas.Windows.SettingsViews
|
||||||
{
|
{
|
||||||
@@ -71,7 +69,7 @@ namespace Ink_Canvas.Windows.SettingsViews
|
|||||||
{
|
{
|
||||||
var copyright = Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyCopyrightAttribute>();
|
var copyright = Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyCopyrightAttribute>();
|
||||||
if (copyright != null && !string.IsNullOrEmpty(copyright.Copyright))
|
if (copyright != null && !string.IsNullOrEmpty(copyright.Copyright))
|
||||||
{
|
{
|
||||||
var copyrightText = copyright.Copyright;
|
var copyrightText = copyright.Copyright;
|
||||||
AboutCopyright.Text = copyrightText;
|
AboutCopyright.Text = copyrightText;
|
||||||
AboutBottomCopyright.Text = copyrightText.Replace("Copyright ©", "© Copyright") + " 所有";
|
AboutBottomCopyright.Text = copyrightText.Replace("Copyright ©", "© Copyright") + " 所有";
|
||||||
@@ -97,13 +95,13 @@ namespace Ink_Canvas.Windows.SettingsViews
|
|||||||
if (File.Exists(filePath))
|
if (File.Exists(filePath))
|
||||||
{
|
{
|
||||||
var bt = File.GetCreationTime(filePath);
|
var bt = File.GetCreationTime(filePath);
|
||||||
var m = bt.Month.ToString().PadLeft(2, '0');
|
var m = bt.Month.ToString().PadLeft(2, '0');
|
||||||
var d = bt.Day.ToString().PadLeft(2, '0');
|
var d = bt.Day.ToString().PadLeft(2, '0');
|
||||||
var h = bt.Hour.ToString().PadLeft(2, '0');
|
var h = bt.Hour.ToString().PadLeft(2, '0');
|
||||||
var min = bt.Minute.ToString().PadLeft(2, '0');
|
var min = bt.Minute.ToString().PadLeft(2, '0');
|
||||||
var s = bt.Second.ToString().PadLeft(2, '0');
|
var s = bt.Second.ToString().PadLeft(2, '0');
|
||||||
AboutBuildTime.Text = $"{bt.Year}-{m}-{d} {h}:{min}:{s}";
|
AboutBuildTime.Text = $"{bt.Year}-{m}-{d} {h}:{min}:{s}";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AboutBuildTime.Text = "获取失败";
|
AboutBuildTime.Text = "获取失败";
|
||||||
@@ -122,7 +120,7 @@ namespace Ink_Canvas.Windows.SettingsViews
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var support = TouchTabletDetectHelper.IsTouchEnabled();
|
var support = TouchTabletDetectHelper.IsTouchEnabled();
|
||||||
var touchcount = TouchTabletDetectHelper.GetTouchTabletDevices().Count;
|
var touchcount = TouchTabletDetectHelper.GetTouchTabletDevices().Count;
|
||||||
|
|
||||||
Dispatcher.BeginInvoke(() =>
|
Dispatcher.BeginInvoke(() =>
|
||||||
{
|
{
|
||||||
@@ -145,8 +143,8 @@ namespace Ink_Canvas.Windows.SettingsViews
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Dispatcher.BeginInvoke(() =>
|
Dispatcher.BeginInvoke(() =>
|
||||||
AboutTouchTabletText.Text = "检测失败");
|
AboutTouchTabletText.Text = "检测失败");
|
||||||
System.Diagnostics.Debug.WriteLine($"检测触摸设备失败: {ex.Message}");
|
System.Diagnostics.Debug.WriteLine($"检测触摸设备失败: {ex.Message}");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -208,12 +206,12 @@ namespace Ink_Canvas.Windows.SettingsViews
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ManagementObjectCollection collection;
|
ManagementObjectCollection collection;
|
||||||
using (var searcher = new ManagementObjectSearcher(@"Select * From Win32_PnPEntity"))
|
using (var searcher = new ManagementObjectSearcher(@"Select * From Win32_PnPEntity"))
|
||||||
collection = searcher.Get();
|
collection = searcher.Get();
|
||||||
|
|
||||||
foreach (var device in collection)
|
foreach (var device in collection)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var name = device.GetPropertyValue("Name")?.ToString() ?? "";
|
var name = device.GetPropertyValue("Name")?.ToString() ?? "";
|
||||||
@@ -231,20 +229,20 @@ namespace Ink_Canvas.Windows.SettingsViews
|
|||||||
descLower.Contains("touch") ||
|
descLower.Contains("touch") ||
|
||||||
descLower.Contains("digitizer"))
|
descLower.Contains("digitizer"))
|
||||||
{
|
{
|
||||||
devices.Add(new USBDeviceInfo(
|
devices.Add(new USBDeviceInfo(
|
||||||
device.GetPropertyValue("DeviceID")?.ToString() ?? "",
|
device.GetPropertyValue("DeviceID")?.ToString() ?? "",
|
||||||
device.GetPropertyValue("PNPDeviceID")?.ToString() ?? "",
|
device.GetPropertyValue("PNPDeviceID")?.ToString() ?? "",
|
||||||
description
|
description
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
collection.Dispose();
|
collection.Dispose();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -271,10 +269,10 @@ namespace Ink_Canvas.Windows.SettingsViews
|
|||||||
public static DateTimeOffset? GetBuildDateTime(Assembly assembly)
|
public static DateTimeOffset? GetBuildDateTime(Assembly assembly)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
|
||||||
var path = assembly.Location;
|
|
||||||
if (string.IsNullOrEmpty(path) || !File.Exists(path))
|
|
||||||
{
|
{
|
||||||
|
var path = assembly.Location;
|
||||||
|
if (string.IsNullOrEmpty(path) || !File.Exists(path))
|
||||||
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -298,18 +296,18 @@ namespace Ink_Canvas.Windows.SettingsViews
|
|||||||
fileStream.Read(fileHeader, 0, fileHeader.Length);
|
fileStream.Read(fileHeader, 0, fileHeader.Length);
|
||||||
|
|
||||||
var pinnedBuffer = GCHandle.Alloc(fileHeader, GCHandleType.Pinned);
|
var pinnedBuffer = GCHandle.Alloc(fileHeader, GCHandleType.Pinned);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var coffHeader = (_IMAGE_FILE_HEADER)Marshal.PtrToStructure(pinnedBuffer.AddrOfPinnedObject(), typeof(_IMAGE_FILE_HEADER));
|
var coffHeader = (_IMAGE_FILE_HEADER)Marshal.PtrToStructure(pinnedBuffer.AddrOfPinnedObject(), typeof(_IMAGE_FILE_HEADER));
|
||||||
var epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
var epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
||||||
var buildTime = epoch.AddSeconds(coffHeader.TimeDateStamp);
|
var buildTime = epoch.AddSeconds(coffHeader.TimeDateStamp);
|
||||||
return new DateTimeOffset(buildTime.ToLocalTime());
|
return new DateTimeOffset(buildTime.ToLocalTime());
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
pinnedBuffer.Free();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
finally
|
|
||||||
{
|
|
||||||
pinnedBuffer.Free();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using Ink_Canvas;
|
|
||||||
using iNKORE.UI.WPF.Helpers;
|
using iNKORE.UI.WPF.Helpers;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using Ink_Canvas.Windows.SettingsViews;
|
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews
|
namespace Ink_Canvas.Windows.SettingsViews
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
using Ink_Canvas;
|
|
||||||
using iNKORE.UI.WPF.Helpers;
|
using iNKORE.UI.WPF.Helpers;
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Controls.Primitives;
|
|
||||||
using System.Windows.Input;
|
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews
|
namespace Ink_Canvas.Windows.SettingsViews
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using Ink_Canvas;
|
|
||||||
using iNKORE.UI.WPF.Helpers;
|
using iNKORE.UI.WPF.Helpers;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
using Ink_Canvas;
|
|
||||||
using iNKORE.UI.WPF.Helpers;
|
using iNKORE.UI.WPF.Helpers;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using Ink_Canvas;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
using Ink_Canvas;
|
|
||||||
using iNKORE.UI.WPF.Helpers;
|
using iNKORE.UI.WPF.Helpers;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
using Microsoft.International.Converters.PinYinConverter;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Globalization;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
@@ -9,7 +9,6 @@ using System.Windows;
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using Microsoft.International.Converters.PinYinConverter;
|
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews
|
namespace Ink_Canvas.Windows.SettingsViews
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Ink_Canvas.Helpers;
|
using Ink_Canvas.Helpers;
|
||||||
using iNKORE.UI.WPF.Helpers;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using Ink_Canvas;
|
|
||||||
using iNKORE.UI.WPF.Helpers;
|
using iNKORE.UI.WPF.Helpers;
|
||||||
using System;
|
using System;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
@@ -45,7 +44,7 @@ namespace Ink_Canvas.Windows.SettingsViews
|
|||||||
{
|
{
|
||||||
System.Diagnostics.Debug.WriteLine($"SettingsPanelBase 应用主题时出错: {ex.Message}");
|
System.Diagnostics.Debug.WriteLine($"SettingsPanelBase 应用主题时出错: {ex.Message}");
|
||||||
}
|
}
|
||||||
LoadSettings();
|
LoadSettings();
|
||||||
_isLoaded = true;
|
_isLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using Ink_Canvas;
|
|
||||||
using iNKORE.UI.WPF.Helpers;
|
using iNKORE.UI.WPF.Helpers;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
using Ink_Canvas;
|
|
||||||
using iNKORE.UI.WPF.Helpers;
|
using iNKORE.UI.WPF.Helpers;
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using Ink_Canvas;
|
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews
|
namespace Ink_Canvas.Windows.SettingsViews
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
using Ink_Canvas;
|
using Hardcodet.Wpf.TaskbarNotification;
|
||||||
using iNKORE.UI.WPF.Helpers;
|
using iNKORE.UI.WPF.Helpers;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using Hardcodet.Wpf.TaskbarNotification;
|
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews
|
namespace Ink_Canvas.Windows.SettingsViews
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
using Ink_Canvas.Helpers;
|
||||||
using iNKORE.UI.WPF.Helpers;
|
using iNKORE.UI.WPF.Helpers;
|
||||||
using iNKORE.UI.WPF.Modern.Controls;
|
using iNKORE.UI.WPF.Modern.Controls;
|
||||||
using Ink_Canvas.Helpers;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -9,8 +9,8 @@ using System.Threading.Tasks;
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using MessageBox = iNKORE.UI.WPF.Modern.Controls.MessageBox;
|
|
||||||
using static Ink_Canvas.Helpers.AutoUpdateHelper;
|
using static Ink_Canvas.Helpers.AutoUpdateHelper;
|
||||||
|
using MessageBox = iNKORE.UI.WPF.Modern.Controls.MessageBox;
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews
|
namespace Ink_Canvas.Windows.SettingsViews
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using iNKORE.UI.WPF.Helpers;
|
|
||||||
using Ink_Canvas.Windows.SettingsViews;
|
using Ink_Canvas.Windows.SettingsViews;
|
||||||
|
using iNKORE.UI.WPF.Helpers;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
|||||||
Reference in New Issue
Block a user