refactor: 移除按笔画擦除功能及相关UI元素
移除不再需要的按笔画擦除功能代码和对应的XAML界面元素,简化代码结构
This commit is contained in:
@@ -1789,19 +1789,6 @@
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border x:Name="BoardEraserByStrokes" Width="60" Height="55"
|
||||
MouseDown="Border_MouseDown"
|
||||
Visibility="Collapsed" d:Visibility="Visible"
|
||||
MouseUp="BoardEraserIconByStrokes_Click" Background="{DynamicResource BoardFloatBarBackground}"
|
||||
Opacity="1">
|
||||
<Grid Margin="6,6,6,4">
|
||||
<Image VerticalAlignment="Top"
|
||||
Source="/Resources/Icons-png/eraser-line.png"
|
||||
RenderOptions.BitmapScalingMode="HighQuality" Height="28" Width="28" />
|
||||
<TextBlock Text="{i18n:I18n Key=Board_StrokeEraser}" Foreground="{DynamicResource FloatBarForeground}" VerticalAlignment="Bottom"
|
||||
HorizontalAlignment="Center" FontSize="12" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<controls:BoardToolbarButton x:Name="BoardGeometry"
|
||||
Label="{i18n:I18n Key=Board_Shape}"
|
||||
IconGeometry="F1 M24,24z M0,0z M17.8604,10.7597L12.0068,1.17001 6.13961,10.7597 17.8604,10.7597z M10.9345,13.2403L1.34476,13.2403 1.34476,22.83 10.9345,22.83 10.9345,13.2403z M17.8604,13.2403C15.2122,13.2403 13.0655,15.387 13.0655,18.0352 13.0655,20.6833 15.2122,22.83 17.8604,22.83 20.5085,22.83 22.6552,20.6833 22.6552,18.0352 22.6552,15.387 20.5085,13.2403 17.8604,13.2403z"
|
||||
|
||||
@@ -332,41 +332,7 @@ namespace Ink_Canvas
|
||||
/// - 启用橡皮擦模式
|
||||
/// - 设置橡皮擦形状为圆形
|
||||
/// - 设置当前工具模式为按笔画擦除
|
||||
/// - 禁用形状绘制模式
|
||||
/// - 重置钢笔类型和属性
|
||||
/// - 触发编辑模式变更事件
|
||||
/// - 取消单指拖动模式
|
||||
/// - 隐藏子面板
|
||||
/// </remarks>
|
||||
private void BoardEraserIconByStrokes_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//if (BoardEraserByStrokes.Background.ToString() == "#FF679CF4") {
|
||||
// AnimationsHelper.ShowWithSlideFromBottomAndFade(BoardDeleteIcon);
|
||||
//}
|
||||
//else {
|
||||
// 禁用高级橡皮擦系统
|
||||
DisableEraserOverlay();
|
||||
|
||||
forceEraser = true;
|
||||
forcePointEraser = false;
|
||||
|
||||
inkCanvas.EraserShape = new EllipseStylusShape(5, 5);
|
||||
// 使用集中化的工具模式切换方法
|
||||
SetCurrentToolMode(InkCanvasEditingMode.EraseByStroke);
|
||||
drawingShapeMode = 0;
|
||||
|
||||
penType = 0;
|
||||
drawingAttributes.IsHighlighter = false;
|
||||
drawingAttributes.StylusTip = StylusTip.Ellipse;
|
||||
|
||||
inkCanvas_EditingModeChanged(inkCanvas, null);
|
||||
CancelSingleFingerDragMode();
|
||||
|
||||
HideSubPanels("eraserByStrokes");
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 处理删除图标点击事件,清空画布内容
|
||||
/// </summary>
|
||||
/// <param name="sender">事件发送者</param>
|
||||
|
||||
Reference in New Issue
Block a user