diff --git a/Ink Canvas/AssemblyInfo.cs b/Ink Canvas/AssemblyInfo.cs index c52e2153..aef12ee1 100644 --- a/Ink Canvas/AssemblyInfo.cs +++ b/Ink Canvas/AssemblyInfo.cs @@ -49,5 +49,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.7.0.1")] -[assembly: AssemblyFileVersion("1.7.0.1")] +[assembly: AssemblyVersion("1.7.0.3")] +[assembly: AssemblyFileVersion("1.7.0.3")] diff --git a/Ink Canvas/Helpers/AutoUpdateHelper.cs b/Ink Canvas/Helpers/AutoUpdateHelper.cs index 3058aa97..ad4e9ae5 100644 --- a/Ink Canvas/Helpers/AutoUpdateHelper.cs +++ b/Ink Canvas/Helpers/AutoUpdateHelper.cs @@ -886,14 +886,14 @@ namespace Ink_Canvas.Helpers if (channel == UpdateChannel.Release) { // Release通道更新日志地址 - primaryUrl = "https://github.com/InkCanvasForClass/community/raw/refs/heads/beta/UpdateLog.txt"; - fallbackUrl = "https://bgithub.xyz/InkCanvasForClass/community/raw/refs/heads/main/UpdateLog.txt"; + primaryUrl = "https://github.com/InkCanvasForClass/community/raw/refs/heads/beta/UpdateLog.md"; + fallbackUrl = "https://bgithub.xyz/InkCanvasForClass/community/raw/refs/heads/main/UpdateLog.md"; } else { // Beta通道更新日志地址 - primaryUrl = "https://github.com/InkCanvasForClass/community-beta/raw/refs/heads/main/UpdateLog.txt"; - fallbackUrl = "https://bgithub.xyz/InkCanvasForClass/community-beta/raw/refs/heads/main/UpdateLog.txt"; + primaryUrl = "https://github.com/InkCanvasForClass/community-beta/raw/refs/heads/main/UpdateLog.md"; + fallbackUrl = "https://bgithub.xyz/InkCanvasForClass/community-beta/raw/refs/heads/main/UpdateLog.md"; } LogHelper.WriteLogToFile($"AutoUpdate | Getting update log from {channel} channel"); diff --git a/Ink Canvas/InkCanvasForClass_mlbp2gn0_wpftmp.csproj b/Ink Canvas/InkCanvasForClass_mlbp2gn0_wpftmp.csproj new file mode 100644 index 00000000..97db535e --- /dev/null +++ b/Ink Canvas/InkCanvasForClass_mlbp2gn0_wpftmp.csproj @@ -0,0 +1,447 @@ + + + InkCanvasForClass + obj\Debug\ + obj\ + C:\Users\Administrator\Desktop\ICC CE\ICC CE main\community\Ink Canvas\obj\ + <_TargetAssemblyProjectName>InkCanvasForClass + Ink_Canvas + + + + win;win-x86;win-x64;win-arm64 + WinExe + Ink_Canvas + net472 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + true + false + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 2 + 2.0.2.%2a + false + false + False + true + Debug;Release;x86 Debug + + + embedded + bin\$(Configuration)\ + True + + + embedded + bin\$(Configuration)\ + True + + + embedded + bin\$(Configuration)\ + True + + + Resources\icc.ico + + + bin\$(Platform)\$(Configuration)\ + full + 7.3 + true + + + bin\$(Platform)\$(Configuration)\ + full + 7.3 + true + + + bin\$(Platform)\$(Configuration)\ + pdbonly + 7.3 + true + + + app.manifest + InkCanvasForClass + 5.0.4 + Dubi906w + InkCanvasForClass + © Copyright HARKOTEK Studio 2024-now + https://icc.bliemhax.com + bundled + False + AnyCPU + + + bin\$(Platform)\$(Configuration)\ + full + 7.3 + true + + + bin\$(Platform)\$(Configuration)\ + full + 7.3 + true + + + bin\$(Platform)\$(Configuration)\ + pdbonly + 7.3 + true + + + bin\$(Platform)\$(Configuration)\ + full + 7.3 + true + + + bin\$(Platform)\$(Configuration)\ + full + 7.3 + true + + + bin\$(Platform)\$(Configuration)\ + pdbonly + 7.3 + true + + + + + + + + + + + + + + + + + + + + + {F935DC20-1CF0-11D0-ADB9-00C04FD58A0B} + 1 + 0 + 0 + tlbimp + False + True + + + {00020430-0000-0000-C000-000000000046} + 2 + 0 + 0 + primary + False + True + + + {0002E157-0000-0000-C000-000000000046} + 5 + 3 + 0 + primary + False + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Settings.settings + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + + + True + + + True + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Ink Canvas/MainWindow.xaml.cs b/Ink Canvas/MainWindow.xaml.cs index 98de85fd..ba242a9d 100644 --- a/Ink Canvas/MainWindow.xaml.cs +++ b/Ink Canvas/MainWindow.xaml.cs @@ -211,7 +211,7 @@ namespace Ink_Canvas { // 自动收纳到侧边栏 if (Settings.Startup.IsFoldAtStartup) { - FoldFloatingBar_MouseUp(null, null); + FoldFloatingBar_MouseUp(new object(), null); } // 恢复崩溃后操作设置 diff --git a/Ink Canvas/MainWindow_cs/MW_AutoFold.cs b/Ink Canvas/MainWindow_cs/MW_AutoFold.cs index 58073662..e9c244f9 100644 --- a/Ink Canvas/MainWindow_cs/MW_AutoFold.cs +++ b/Ink Canvas/MainWindow_cs/MW_AutoFold.cs @@ -54,7 +54,7 @@ namespace Ink_Canvas { // FloatingBarIcons_MouseUp_New(sender); if (sender == null) - foldFloatingBarByUser = true; + foldFloatingBarByUser = false; else foldFloatingBarByUser = true; unfoldFloatingBarByUser = false; @@ -91,6 +91,7 @@ namespace Ink_Canvas { RightBottomPanelForPPTNavigation.Visibility = Visibility.Collapsed; LeftSidePanelForPPTNavigation.Visibility = Visibility.Collapsed; RightSidePanelForPPTNavigation.Visibility = Visibility.Collapsed; + GridForFloatingBarDraging.Visibility = Visibility.Collapsed; ViewboxFloatingBarMarginAnimation(-60); HideSubPanels("cursor"); SidePannelMarginAnimation(-10); diff --git a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs index 03ee2b5e..50a9a8ba 100644 --- a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs +++ b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs @@ -1444,7 +1444,7 @@ namespace Ink_Canvas { FloatingbarSelectionBG.Visibility = Visibility.Visible; System.Windows.Controls.Canvas.SetLeft(FloatingbarSelectionBG, 84); - forceEraser = true; + forceEraser = false; forcePointEraser = true; // 即使手掌触发过面积擦,也强制应用当前的EraserShapeType设置 @@ -1502,7 +1502,7 @@ namespace Ink_Canvas { k = Settings.Canvas.EraserShapeType == 0 ? 1.25 : 1.2; break; case 4: - k = Settings.Canvas.EraserShapeType == 0 ? 1.8 : 1.6; + k = Settings.Canvas.EraserShapeType == 0 ? 1.5 : 1.3; break; } @@ -1524,7 +1524,7 @@ namespace Ink_Canvas { FloatingbarSelectionBG.Visibility = Visibility.Visible; System.Windows.Controls.Canvas.SetLeft(FloatingbarSelectionBG, 112); - forceEraser = true; + forceEraser = false; forcePointEraser = false; inkCanvas.EraserShape = new EllipseStylusShape(5, 5); diff --git a/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs b/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs index 100de955..9f6adb19 100644 --- a/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs +++ b/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs @@ -485,7 +485,7 @@ namespace Ink_Canvas { k = 1.25; break; case 4: - k = 1.8; + k = 1.5; break; } @@ -506,7 +506,7 @@ namespace Ink_Canvas { k = 1.2; break; case 4: - k = 1.6; + k = 1.5; break; } diff --git a/Ink Canvas/MainWindow_cs/MW_ShapeDrawing.cs b/Ink Canvas/MainWindow_cs/MW_ShapeDrawing.cs index 84009390..656eb16e 100644 --- a/Ink Canvas/MainWindow_cs/MW_ShapeDrawing.cs +++ b/Ink Canvas/MainWindow_cs/MW_ShapeDrawing.cs @@ -521,7 +521,7 @@ namespace Ink_Canvas { k = 1.25; break; case 4: - k = 1.8; + k = 1.5; break; } diff --git a/Ink Canvas/MainWindow_cs/MW_TouchEvents.cs b/Ink Canvas/MainWindow_cs/MW_TouchEvents.cs index 0f302a29..d962f890 100644 --- a/Ink Canvas/MainWindow_cs/MW_TouchEvents.cs +++ b/Ink Canvas/MainWindow_cs/MW_TouchEvents.cs @@ -56,25 +56,10 @@ namespace Ink_Canvas { if ((Settings.Advanced.TouchMultiplier != 0 || !Settings.Advanced.IsSpecialScreen) //启用特殊屏幕且触摸倍数为 0 时禁用橡皮 && boundWidth > BoundsWidth * 2.5) { if (drawingShapeMode == 0 && forceEraser) return; - double k = 1; - switch (Settings.Canvas.EraserSize) { - case 0: - k = 0.5; - break; - case 1: - k = 0.8; - break; - case 3: - k = 1.25; - break; - case 4: - k = 1.8; - break; - } - - inkCanvas.EraserShape = new EllipseStylusShape(boundWidth * k * eraserMultiplier * 0.25, - boundWidth * k * eraserMultiplier * 0.25); + currentPalmEraserShape = GetPalmRectangleEraserShape(eraserMultiplier); + inkCanvas.EraserShape = currentPalmEraserShape; TouchDownPointsList[e.TouchDevice.Id] = InkCanvasEditingMode.EraseByPoint; + isLastTouchEraser = true; inkCanvas.EditingMode = InkCanvasEditingMode.EraseByPoint; } else { @@ -209,6 +194,34 @@ namespace Ink_Canvas { // 用于记录手掌擦的尺寸和形状 private StylusShape currentPalmEraserShape = null; + /// + /// 根据用户在设置面板中选择的橡皮大小,生成"手掌橡皮"默认的矩形黑板擦形状。 + /// 该形状大小不随触控面积等实时变化,仅受设置的橡皮大小影响。 + /// + /// 特殊屏幕触摸倍数修正系数 + /// RectangleStylusShape + private StylusShape GetPalmRectangleEraserShape(double multiplier = 1.0) { + double k = 1; + switch (Settings.Canvas.EraserSize) { + case 0: + k = 0.5; + break; + case 1: + k = 0.8; + break; + case 3: + k = 1.25; + break; + case 4: + k = 1.5; + break; + } + + // 参照圆形橡皮 k*90 的基准,将矩形宽度压缩到 0.6,保持高度一致 + double baseLen = k * 90 * multiplier; + return new RectangleStylusShape(baseLen * 0.6, baseLen); + } + private void Main_Grid_TouchDown(object sender, TouchEventArgs e) { // 确保触摸时显示自定义光标 if (Settings.Canvas.IsShowCursor) { @@ -243,35 +256,10 @@ namespace Ink_Canvas { isLastTouchEraser = true; if (drawingShapeMode == 0 && forceEraser) return; if (boundsWidth > BoundsWidth * 2.5) { - double k = 1; - switch (Settings.Canvas.EraserSize) { - case 0: - k = 0.5; - break; - case 1: - k = 0.8; - break; - case 3: - k = 1.25; - break; - case 4: - k = 1.8; - break; - } - - // 根据EraserShapeType设置合适的橡皮擦形状并保存 - if (Settings.Canvas.EraserShapeType == 0) { - // 圆形擦 - currentPalmEraserShape = new EllipseStylusShape(boundsWidth * k * eraserMultiplier, - boundsWidth * k * eraserMultiplier); - } else if (Settings.Canvas.EraserShapeType == 1) { - // 矩形黑板擦 - currentPalmEraserShape = new RectangleStylusShape(boundsWidth * k * eraserMultiplier * 0.6, - boundsWidth * k * eraserMultiplier); - } - + // 直接使用固定尺寸的矩形黑板擦形状,不随触控面积动态变化 + currentPalmEraserShape = GetPalmRectangleEraserShape(eraserMultiplier); inkCanvas.EraserShape = currentPalmEraserShape; - inkCanvas.EditingMode = InkCanvasEditingMode.EraseByPoint; + TouchDownPointsList[e.TouchDevice.Id] = InkCanvasEditingMode.EraseByPoint; } else { if (StackPanelPPTControls.Visibility == Visibility.Visible && inkCanvas.Strokes.Count == 0 && @@ -282,9 +270,10 @@ namespace Ink_Canvas { inkCanvas.Opacity = 0.1; } else { - currentPalmEraserShape = new EllipseStylusShape(5, 5); + // 手掌橡皮固定为矩形黑板擦,大小由设置决定 + currentPalmEraserShape = GetPalmRectangleEraserShape(eraserMultiplier); inkCanvas.EraserShape = currentPalmEraserShape; - inkCanvas.EditingMode = InkCanvasEditingMode.EraseByStroke; + TouchDownPointsList[e.TouchDevice.Id] = InkCanvasEditingMode.EraseByPoint; } } } diff --git a/Ink Canvas/Properties/AssemblyInfo.cs b/Ink Canvas/Properties/AssemblyInfo.cs index 2f1690a3..1d6bf165 100644 --- a/Ink Canvas/Properties/AssemblyInfo.cs +++ b/Ink Canvas/Properties/AssemblyInfo.cs @@ -49,5 +49,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.7.0.1")] -[assembly: AssemblyFileVersion("1.7.0.1")] +[assembly: AssemblyVersion("1.7.0.3")] +[assembly: AssemblyFileVersion("1.7.0.3")] diff --git a/UpdateLog.md b/UpdateLog.md new file mode 100644 index 00000000..2e6e94e4 --- /dev/null +++ b/UpdateLog.md @@ -0,0 +1 @@ +1. 更新了自动更新 diff --git a/UpdateLog.txt b/UpdateLog.txt deleted file mode 100644 index 2a2ec378..00000000 --- a/UpdateLog.txt +++ /dev/null @@ -1 +0,0 @@ -1.更新了自动更新