Revert "feat: 选区截图时保留屏幕笔迹 (#406)" (#418)

This reverts commit f7aa107a62.
This commit is contained in:
CJK_mkp
2026-03-28 17:23:27 +08:00
committed by GitHub
parent 837311b2b7
commit 91c2fa4eee
4 changed files with 17 additions and 280 deletions
@@ -37,7 +37,6 @@ namespace Ink_Canvas
private Bitmap _capturedCameraImage = null;
private DateTime _lastBlankClickTime = DateTime.MinValue;
private WpfPoint _lastBlankClickPosition;
private readonly Action<bool> _includeInkPreviewChanged;
private const int DoubleClickTimeThresholdMs = 300; // 双击判定时间阈值(常见范围 200~500ms)
private const double DoubleClickDistanceThresholdPx = 12; // 双击判定位置阈值(像素)
@@ -56,17 +55,10 @@ namespace Ink_Canvas
public Bitmap CameraImage { get; private set; }
public System.Windows.Media.Imaging.BitmapSource CameraBitmapSource { get; private set; }
public bool ShouldAddToWhiteboard { get; private set; }
public bool ShouldIncludeInk { get; private set; } = true;
public ScreenshotSelectorWindow()
: this(null)
{
}
public ScreenshotSelectorWindow(Action<bool> includeInkPreviewChanged)
{
InitializeComponent();
_includeInkPreviewChanged = includeInkPreviewChanged;
// 设置窗口覆盖所有屏幕
SetupFullScreenOverlay();
@@ -92,8 +84,6 @@ namespace Ink_Canvas
timer.Stop();
};
timer.Start();
ApplyIncludeInkPreviewState(ShouldIncludeInk);
}
private void InitializeFreehandMode()
@@ -539,30 +529,6 @@ namespace Ink_Canvas
ConfirmSelection();
}
private void IncludeInkCheckBox_Checked(object sender, RoutedEventArgs e)
{
ShouldIncludeInk = true;
ApplyIncludeInkPreviewState(ShouldIncludeInk);
}
private void IncludeInkCheckBox_Unchecked(object sender, RoutedEventArgs e)
{
ShouldIncludeInk = false;
ApplyIncludeInkPreviewState(ShouldIncludeInk);
}
private void ApplyIncludeInkPreviewState(bool shouldIncludeInk)
{
try
{
_includeInkPreviewChanged?.Invoke(shouldIncludeInk);
}
catch (Exception ex)
{
LogHelper.WriteLogToFile($"更新“包含墨迹”实时预览失败: {ex.Message}", LogHelper.LogType.Warning);
}
}
private void ConfirmCameraCapture()
{
try
@@ -1514,9 +1480,6 @@ namespace Ink_Canvas
{
try
{
// 关闭窗口时恢复墨迹预览状态
ApplyIncludeInkPreviewState(true);
// 清理摄像头资源
if (_cameraService != null)
{