mirror of
https://github.com/greenshot/greenshot
synced 2025-08-22 14:24:43 -07:00
#268 coded - proposition
This commit is contained in:
parent
e5019bbb9d
commit
0f6d374170
3 changed files with 14 additions and 1 deletions
|
@ -64,6 +64,8 @@ namespace Greenshot.Destinations {
|
||||||
|
|
||||||
public override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) {
|
public override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) {
|
||||||
ExportInformation exportInformation = new ExportInformation(Designation, Description);
|
ExportInformation exportInformation = new ExportInformation(Designation, Description);
|
||||||
|
// close the form after copying the image to clipboard
|
||||||
|
exportInformation.CloseForm = true;
|
||||||
try {
|
try {
|
||||||
ClipboardHelper.SetClipboardData(surface);
|
ClipboardHelper.SetClipboardData(surface);
|
||||||
exportInformation.ExportMade = true;
|
exportInformation.ExportMade = true;
|
||||||
|
|
|
@ -932,7 +932,11 @@ namespace Greenshot {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (destination.EditorShortcutKeys == keys) {
|
if (destination.EditorShortcutKeys == keys) {
|
||||||
destination.ExportCapture(true, _surface, _surface.CaptureDetails);
|
ExportInformation exportInformation = destination.ExportCapture(true, _surface, _surface.CaptureDetails);
|
||||||
|
if (exportInformation != null && exportInformation.ExportMade) {
|
||||||
|
if (exportInformation.CloseForm)
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1273,6 +1277,8 @@ namespace Greenshot {
|
||||||
ExportInformation exportInformation = clickedDestination?.ExportCapture(true, _surface, _surface.CaptureDetails);
|
ExportInformation exportInformation = clickedDestination?.ExportCapture(true, _surface, _surface.CaptureDetails);
|
||||||
if (exportInformation != null && exportInformation.ExportMade) {
|
if (exportInformation != null && exportInformation.ExportMade) {
|
||||||
_surface.Modified = false;
|
_surface.Modified = false;
|
||||||
|
if (exportInformation.CloseForm)
|
||||||
|
this.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,11 @@ namespace GreenshotPlugin.Interfaces {
|
||||||
public string ErrorMessage { get; set; }
|
public string ErrorMessage { get; set; }
|
||||||
|
|
||||||
public string Filepath { get; set; }
|
public string Filepath { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set to true to close the invoking form.
|
||||||
|
/// </summary>
|
||||||
|
public bool CloseForm { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue