优化代码
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Runtime.ExceptionServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Interop;
|
||||
@@ -189,9 +188,7 @@ namespace Ink_Canvas.Helpers
|
||||
|
||||
/// <summary>
|
||||
/// 确保窗口全屏的Hook
|
||||
/// 使用HandleProcessCorruptedStateExceptions,防止访问内存过程中因为一些致命异常导致程序崩溃
|
||||
/// </summary>
|
||||
[HandleProcessCorruptedStateExceptions]
|
||||
private static IntPtr KeepFullScreenHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
|
||||
{
|
||||
//处理WM_WINDOWPOSCHANGING消息
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<OutputType>WinExe</OutputType>
|
||||
@@ -32,7 +32,10 @@
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
<Platforms>AnyCPU;x86;x64</Platforms>
|
||||
<LangVersion>10</LangVersion>
|
||||
<NoWarn>CA1416</NoWarn>
|
||||
<NoWarn>$(NoWarn);CA1416;NU1701;MSB3270;CS8012;NETSDK1138</NoWarn>
|
||||
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
|
||||
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
|
||||
<ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugType>embedded</DebugType>
|
||||
|
||||
@@ -1162,7 +1162,6 @@ namespace Ink_Canvas
|
||||
|
||||
public string _lastAppliedProfileName;
|
||||
private bool isLoaded;
|
||||
private bool _suppressChickenSoupSourceSelectionChanged;
|
||||
private bool forcePointEraser;
|
||||
private bool _pendingStartupAutoUpdateCheck;
|
||||
private bool _sliderTouchSupportInitialized;
|
||||
|
||||
@@ -20,13 +20,6 @@ namespace Ink_Canvas
|
||||
{
|
||||
#region Behavior
|
||||
|
||||
/// <summary>
|
||||
/// 内部标记:是否正在内部更改更新通道
|
||||
/// </summary>
|
||||
private bool _isChangingUpdateChannelInternally;
|
||||
/// <summary>内部标记:是否正在内部更改「更新包架构」(32/64 位 ZIP)</summary>
|
||||
private bool _isChangingUpdatePackageArchInternally;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 处理PowerPoint支持开关状态更改事件
|
||||
@@ -1299,7 +1292,6 @@ namespace Ink_Canvas
|
||||
private void UpdatePackageArchitectureSelector_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
if (_isChangingUpdatePackageArchInternally) return;
|
||||
if (!(sender is RadioButton radioButton) || radioButton.Tag == null) return;
|
||||
|
||||
var newArch = string.Equals(radioButton.Tag.ToString(), "X64", StringComparison.OrdinalIgnoreCase)
|
||||
|
||||
@@ -585,12 +585,6 @@
|
||||
<data name="InkRecog_ShapeEngineHint" xml:space="preserve">
|
||||
<value> 自动:64 位进程使用 WinRT(Windows 10+),32 位使用 IACore。可强制指定 IACore 或 WinRT。</value>
|
||||
</data>
|
||||
<data name="InkRecog_HandwritingBeautify" xml:space="preserve">
|
||||
<value>手写体纠正</value>
|
||||
</data>
|
||||
<data name="InkRecog_HandwritingBeautifyHint" xml:space="preserve">
|
||||
<value># 开启后,将对手写笔画进行更平滑、更工整的纠正处理(基于 WinRT)。</value>
|
||||
</data>
|
||||
<data name="InkRecog_ShapeEngineAuto" xml:space="preserve">
|
||||
<value>自动</value>
|
||||
</data>
|
||||
|
||||
@@ -45,35 +45,6 @@
|
||||
</application>
|
||||
</compatibility>
|
||||
|
||||
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
|
||||
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
|
||||
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
|
||||
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config.
|
||||
|
||||
Makes the application long-path aware. See https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
|
||||
<!--
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
|
||||
-->
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<!-- dpiAwareness is recognized only on Win10 1607(aka RS1)+ -->
|
||||
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2,PerMonitor</dpiAwareness>
|
||||
<!-- Prior to Win10 1607, WPF really doesn't support per-mon DPI. Do not specify true/pm - use just true -->
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||
<!-- optional -->
|
||||
<!--
|
||||
<highResolutionScrollingAware>true</highResolutionScrollingAware>
|
||||
<ultraHighResolutionScrollingAware>true</ultraHighResolutionScrollingAware>
|
||||
-->
|
||||
</windowsSettings>
|
||||
</application>
|
||||
|
||||
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
|
||||
|
||||
<dependency>
|
||||
|
||||
Reference in New Issue
Block a user