优化代码
This commit is contained in:
@@ -47,7 +47,6 @@ namespace Ink_Canvas.Helpers
|
||||
AvailableCameras.Add(device);
|
||||
}
|
||||
|
||||
LogHelper.WriteLogToFile($"发现 {AvailableCameras.Count} 个摄像头设备");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -120,7 +119,6 @@ namespace Ink_Canvas.Helpers
|
||||
}
|
||||
|
||||
_isCapturing = false;
|
||||
LogHelper.WriteLogToFile("摄像头预览已停止");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -237,7 +237,6 @@ namespace Ink_Canvas
|
||||
graphics.CopyFromScreen(x, y, 0, 0, new Size(width, height), CopyPixelOperation.SourceCopy);
|
||||
}
|
||||
|
||||
LogHelper.WriteLogToFile($"成功截取区域: X={x}, Y={y}, Width={width}, Height={height}");
|
||||
return bitmap;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -492,7 +491,6 @@ namespace Ink_Canvas
|
||||
InitializeScreenshotTransform(image);
|
||||
}
|
||||
|
||||
LogHelper.WriteLogToFile($"截图居中完成: 位置({centerX}, {centerY}), 尺寸({newWidth}x{newHeight})");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user