improve:保存截屏
This commit is contained in:
@@ -838,7 +838,7 @@ namespace Ink_Canvas
|
|||||||
_pptUIManager?.UpdateNavigationPanelsVisibility();
|
_pptUIManager?.UpdateNavigationPanelsVisibility();
|
||||||
|
|
||||||
if (Settings.Automation.IsAutoSaveStrokesAtClear &&
|
if (Settings.Automation.IsAutoSaveStrokesAtClear &&
|
||||||
inkCanvas.Strokes.Count > Settings.Automation.MinimumAutomationStrokeNumber) SaveScreenShot(true);
|
inkCanvas.Strokes.Count > Settings.Automation.MinimumAutomationStrokeNumber) CaptureAndEnqueueScreenshotSave(true);
|
||||||
|
|
||||||
if (BtnPPTSlideShowEnd.Visibility == Visibility.Collapsed)
|
if (BtnPPTSlideShowEnd.Visibility == Visibility.Collapsed)
|
||||||
new Thread(() =>
|
new Thread(() =>
|
||||||
@@ -969,10 +969,10 @@ namespace Ink_Canvas
|
|||||||
{
|
{
|
||||||
var currentSlide = _pptManager?.GetCurrentSlideNumber() ?? 0;
|
var currentSlide = _pptManager?.GetCurrentSlideNumber() ?? 0;
|
||||||
var presentationName = _pptManager?.GetPresentationName() ?? "";
|
var presentationName = _pptManager?.GetPresentationName() ?? "";
|
||||||
SaveScreenShot(true, $"{presentationName}/{currentSlide}_{DateTime.Now:HH-mm-ss}");
|
CaptureAndEnqueueScreenshotSave(true, $"{presentationName}/{currentSlide}_{DateTime.Now:HH-mm-ss}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
SaveScreenShot(true);
|
CaptureAndEnqueueScreenshotSave(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
BtnClear_Click(null, null);
|
BtnClear_Click(null, null);
|
||||||
@@ -2165,9 +2165,9 @@ namespace Ink_Canvas
|
|||||||
{
|
{
|
||||||
var currentSlide = _pptManager?.GetCurrentSlideNumber() ?? 0;
|
var currentSlide = _pptManager?.GetCurrentSlideNumber() ?? 0;
|
||||||
var presentationName = _pptManager?.GetPresentationName() ?? "";
|
var presentationName = _pptManager?.GetPresentationName() ?? "";
|
||||||
SaveScreenShot(true, $"{presentationName}/{currentSlide}_{DateTime.Now:HH-mm-ss}");
|
CaptureAndEnqueueScreenshotSave(true, $"{presentationName}/{currentSlide}_{DateTime.Now:HH-mm-ss}");
|
||||||
}
|
}
|
||||||
else SaveScreenShot(true);
|
else CaptureAndEnqueueScreenshotSave(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BtnPPTSlideShowEnd.Visibility != Visibility.Visible)
|
if (BtnPPTSlideShowEnd.Visibility != Visibility.Visible)
|
||||||
@@ -3627,7 +3627,7 @@ namespace Ink_Canvas
|
|||||||
{
|
{
|
||||||
if (Settings.Automation.IsAutoSaveStrokesAtClear && inkCanvas.Strokes.Count >
|
if (Settings.Automation.IsAutoSaveStrokesAtClear && inkCanvas.Strokes.Count >
|
||||||
Settings.Automation.MinimumAutomationStrokeNumber)
|
Settings.Automation.MinimumAutomationStrokeNumber)
|
||||||
SaveScreenShot(true);
|
CaptureAndEnqueueScreenshotSave(true);
|
||||||
|
|
||||||
//BtnClear_Click(null, null);
|
//BtnClear_Click(null, null);
|
||||||
}
|
}
|
||||||
@@ -3643,7 +3643,7 @@ namespace Ink_Canvas
|
|||||||
{
|
{
|
||||||
if (Settings.Automation.IsAutoSaveStrokesAtClear && inkCanvas.Strokes.Count >
|
if (Settings.Automation.IsAutoSaveStrokesAtClear && inkCanvas.Strokes.Count >
|
||||||
Settings.Automation.MinimumAutomationStrokeNumber)
|
Settings.Automation.MinimumAutomationStrokeNumber)
|
||||||
SaveScreenShot(true);
|
CaptureAndEnqueueScreenshotSave(true);
|
||||||
|
|
||||||
//BtnClear_Click(null, null);
|
//BtnClear_Click(null, null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1947,19 +1947,20 @@ namespace Ink_Canvas
|
|||||||
bool needScreenshot = strokeCount > Settings.Automation.MinimumAutomationStrokeNumber &&
|
bool needScreenshot = strokeCount > Settings.Automation.MinimumAutomationStrokeNumber &&
|
||||||
Settings.PowerPointSettings.IsAutoSaveScreenShotInPowerPoint;
|
Settings.PowerPointSettings.IsAutoSaveScreenShotInPowerPoint;
|
||||||
|
|
||||||
|
if (needScreenshot)
|
||||||
|
{
|
||||||
|
var currentSlide = _pptManager?.GetCurrentSlideNumber() ?? 0;
|
||||||
|
if (currentSlide > 0)
|
||||||
|
{
|
||||||
|
var presentationName = _pptManager?.GetPresentationName() ?? "";
|
||||||
|
CaptureAndEnqueueScreenshotSave(true, $"{presentationName}/{currentSlide}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (needScreenshot)
|
|
||||||
{
|
|
||||||
var currentSlide = _pptManager?.GetCurrentSlideNumber() ?? 0;
|
|
||||||
if (currentSlide > 0)
|
|
||||||
{
|
|
||||||
var presentationName = _pptManager?.GetPresentationName() ?? "";
|
|
||||||
Application.Current.Dispatcher.BeginInvoke(new Action(() => SaveScreenShot(true, $"{presentationName}/{currentSlide}")));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return _pptManager?.TryNavigatePrevious() ?? false;
|
return _pptManager?.TryNavigatePrevious() ?? false;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -1997,19 +1998,20 @@ namespace Ink_Canvas
|
|||||||
bool needScreenshot = strokeCount > Settings.Automation.MinimumAutomationStrokeNumber &&
|
bool needScreenshot = strokeCount > Settings.Automation.MinimumAutomationStrokeNumber &&
|
||||||
Settings.PowerPointSettings.IsAutoSaveScreenShotInPowerPoint;
|
Settings.PowerPointSettings.IsAutoSaveScreenShotInPowerPoint;
|
||||||
|
|
||||||
|
if (needScreenshot)
|
||||||
|
{
|
||||||
|
var currentSlide = _pptManager?.GetCurrentSlideNumber() ?? 0;
|
||||||
|
if (currentSlide > 0)
|
||||||
|
{
|
||||||
|
var presentationName = _pptManager?.GetPresentationName() ?? "";
|
||||||
|
CaptureAndEnqueueScreenshotSave(true, $"{presentationName}/{currentSlide}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (needScreenshot)
|
|
||||||
{
|
|
||||||
var currentSlide = _pptManager?.GetCurrentSlideNumber() ?? 0;
|
|
||||||
if (currentSlide > 0)
|
|
||||||
{
|
|
||||||
var presentationName = _pptManager?.GetPresentationName() ?? "";
|
|
||||||
Application.Current.Dispatcher.BeginInvoke(new Action(() => SaveScreenShot(true, $"{presentationName}/{currentSlide}")));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return _pptManager?.TryNavigateNext() ?? false;
|
return _pptManager?.TryNavigateNext() ?? false;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
Reference in New Issue
Block a user