代码清理

This commit is contained in:
PrefacedCorg
2025-08-31 11:43:52 +08:00
parent a2b711da05
commit ff086e497c
62 changed files with 826 additions and 825 deletions
@@ -1,3 +1,4 @@
using iNKORE.UI.WPF.Modern.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -6,7 +7,6 @@ using System.Windows.Controls;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using iNKORE.UI.WPF.Modern.Controls;
using Point = System.Windows.Point;
namespace Ink_Canvas
@@ -305,18 +305,18 @@ namespace Ink_Canvas
private void inkCanvas_SelectionChanged(object sender, EventArgs e)
{
if (isProgramChangeStrokeSelection) return;
// 检查是否有图片元素被选中
var selectedElements = inkCanvas.GetSelectedElements();
bool hasImageElement = selectedElements.Any(element => element is Image);
// 如果有图片元素被选中,不显示选择框
if (hasImageElement)
{
GridInkCanvasSelectionCover.Visibility = Visibility.Collapsed;
return;
}
if (inkCanvas.GetSelectedStrokes().Count == 0)
{
GridInkCanvasSelectionCover.Visibility = Visibility.Collapsed;
@@ -520,7 +520,7 @@ namespace Ink_Canvas
}
#region UIElement Selection and Resize
private Rect GetUIElementBounds(UIElement element)
{
if (element is FrameworkElement fe)