From eb616472c40ef201daef3982366c29c2c90069d5 Mon Sep 17 00:00:00 2001 From: RKrom Date: Wed, 4 Apr 2012 13:46:14 +0000 Subject: [PATCH] Changed IDestination, added a manuallyInitiated so the destination can change its behavior depending on the flag. An example use-case would be the word exporter: if the flag is false, which it would be if the word destination is set as THE destination, it would add to the current document if one is available otherwise create a new. This makes it possible to have a kind of session behavior. git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1749 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- Greenshot-OCR-Plugin/OCRDestination.cs | 2 +- Greenshot/Destinations/ClipboardDestination.cs | 2 +- Greenshot/Destinations/EditorDestination.cs | 4 ++-- Greenshot/Destinations/EmailDestination.cs | 2 +- Greenshot/Destinations/ExcelDestination.cs | 4 ++-- Greenshot/Destinations/FileDestination.cs | 2 +- .../Destinations/FileWithDialogDestination.cs | 4 ++-- Greenshot/Destinations/OneNoteDestination.cs | 4 ++-- Greenshot/Destinations/PickerDestination.cs | 4 ++-- .../Destinations/PowerpointDestination.cs | 4 ++-- Greenshot/Destinations/PrinterDestination.cs | 4 ++-- Greenshot/Destinations/WordDestination.cs | 18 +++++++++++++++--- Greenshot/Forms/ImageEditorForm.cs | 16 ++++++++-------- Greenshot/Helpers/CaptureHelper.cs | 4 ++-- Greenshot/Helpers/DestinationHelper.cs | 4 ++-- .../ConfluenceDestination.cs | 2 +- .../ExternalCommandDestination.cs | 2 +- GreenshotImgurPlugin/ImgurDestination.cs | 2 +- GreenshotInterop/OfficeExport/WordExporter.cs | 11 ++++++++--- GreenshotInterop/OfficeInterop/WordInterop.cs | 9 ++++++--- GreenshotJiraPlugin/JiraDestination.cs | 4 ++-- GreenshotPlugin/Core/AbstractDestination.cs | 2 +- GreenshotPlugin/Interfaces/IDestination.cs | 3 ++- PluginExample/SimpleOutputDestination.cs | 2 +- 24 files changed, 68 insertions(+), 47 deletions(-) diff --git a/Greenshot-OCR-Plugin/OCRDestination.cs b/Greenshot-OCR-Plugin/OCRDestination.cs index 1387cecfa..44547b79e 100644 --- a/Greenshot-OCR-Plugin/OCRDestination.cs +++ b/Greenshot-OCR-Plugin/OCRDestination.cs @@ -57,7 +57,7 @@ namespace GreenshotOCR { } } - public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { + public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { OcrPlugin.DoOCR(surface); return true; } diff --git a/Greenshot/Destinations/ClipboardDestination.cs b/Greenshot/Destinations/ClipboardDestination.cs index 5ffa5ae88..3abc64183 100644 --- a/Greenshot/Destinations/ClipboardDestination.cs +++ b/Greenshot/Destinations/ClipboardDestination.cs @@ -70,7 +70,7 @@ namespace Greenshot.Destinations { } } - public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { + public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { try { using (Image image = surface.GetImageForExport()) { ClipboardHelper.SetClipboardData(image); diff --git a/Greenshot/Destinations/EditorDestination.cs b/Greenshot/Destinations/EditorDestination.cs index ebff7ee5d..e012c596d 100644 --- a/Greenshot/Destinations/EditorDestination.cs +++ b/Greenshot/Destinations/EditorDestination.cs @@ -90,8 +90,8 @@ namespace Greenshot.Destinations { yield return new EditorDestination(editor); } } - - public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { + + public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { if (editor == null) { // Make sure we collect the garbage before opening the screenshot GC.Collect(); diff --git a/Greenshot/Destinations/EmailDestination.cs b/Greenshot/Destinations/EmailDestination.cs index 85d234899..2ce2d48ee 100644 --- a/Greenshot/Destinations/EmailDestination.cs +++ b/Greenshot/Destinations/EmailDestination.cs @@ -175,7 +175,7 @@ namespace Greenshot.Destinations { } } - public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { + public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { if (!isOutlookUsed) { using (Image image = surface.GetImageForExport()) { MapiMailMessage.SendImage(image, captureDetails); diff --git a/Greenshot/Destinations/ExcelDestination.cs b/Greenshot/Destinations/ExcelDestination.cs index d35fdaa7b..b62edc3a2 100644 --- a/Greenshot/Destinations/ExcelDestination.cs +++ b/Greenshot/Destinations/ExcelDestination.cs @@ -109,8 +109,8 @@ namespace Greenshot.Destinations { yield return new ExcelDestination(workbookName); } } - - public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { + + public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { string tmpFile = captureDetails.Filename; if (tmpFile == null || surface.Modified) { using (Image image = surface.GetImageForExport()) { diff --git a/Greenshot/Destinations/FileDestination.cs b/Greenshot/Destinations/FileDestination.cs index f31a663d9..2f4734d00 100644 --- a/Greenshot/Destinations/FileDestination.cs +++ b/Greenshot/Destinations/FileDestination.cs @@ -70,7 +70,7 @@ namespace Greenshot.Destinations { } } - public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { + public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { bool outputMade = false; string pattern = conf.OutputFileFilenamePattern; if (string.IsNullOrEmpty(pattern)) { diff --git a/Greenshot/Destinations/FileWithDialogDestination.cs b/Greenshot/Destinations/FileWithDialogDestination.cs index f44d983af..f12709b6c 100644 --- a/Greenshot/Destinations/FileWithDialogDestination.cs +++ b/Greenshot/Destinations/FileWithDialogDestination.cs @@ -70,8 +70,8 @@ namespace Greenshot.Destinations { return GreenshotPlugin.Core.GreenshotResources.getImage("Save.Image"); } } - - public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { + + public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { string savedTo = null; using (Image image = surface.GetImageForExport()) { // Bug #2918756 don't overwrite path if SaveWithDialog returns null! diff --git a/Greenshot/Destinations/OneNoteDestination.cs b/Greenshot/Destinations/OneNoteDestination.cs index 2128c7f1c..6854cee7f 100644 --- a/Greenshot/Destinations/OneNoteDestination.cs +++ b/Greenshot/Destinations/OneNoteDestination.cs @@ -108,8 +108,8 @@ namespace Greenshot.Destinations { yield return new OneNoteDestination(page); } } - - public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { + + public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { using (Image image = surface.GetImageForExport()) { if (page != null) { try { diff --git a/Greenshot/Destinations/PickerDestination.cs b/Greenshot/Destinations/PickerDestination.cs index de53bcf4b..aeb44303e 100644 --- a/Greenshot/Destinations/PickerDestination.cs +++ b/Greenshot/Destinations/PickerDestination.cs @@ -65,7 +65,7 @@ namespace Greenshot.Destinations { } } - public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { + public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { ContextMenuStrip menu = new ContextMenuStrip(); menu.Closing += delegate(object source, ToolStripDropDownClosingEventArgs eventArgs) { LOG.DebugFormat("Close reason: {0}", eventArgs.CloseReason); @@ -94,7 +94,7 @@ namespace Greenshot.Destinations { } // Make sure the menu is closed menu.Close(); - bool result = clickedDestination.ExportCapture(surface, captureDetails); + bool result = clickedDestination.ExportCapture(true, surface, captureDetails); // TODO: Find some better way to detect that we exported to the editor if (!EditorDestination.DESIGNATION.Equals(clickedDestination.Designation) || result == false) { LOG.DebugFormat("Disposing as Destination was {0} and result {1}", clickedDestination.Description, result); diff --git a/Greenshot/Destinations/PowerpointDestination.cs b/Greenshot/Destinations/PowerpointDestination.cs index 93b3bbcf6..af3cf5dde 100644 --- a/Greenshot/Destinations/PowerpointDestination.cs +++ b/Greenshot/Destinations/PowerpointDestination.cs @@ -110,8 +110,8 @@ namespace Greenshot.Destinations { yield return new PowerpointDestination(presentationName); } } - - public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { + + public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { string tmpFile = captureDetails.Filename; Size imageSize = Size.Empty; if (tmpFile == null || surface.Modified) { diff --git a/Greenshot/Destinations/PrinterDestination.cs b/Greenshot/Destinations/PrinterDestination.cs index 0f5a1e655..ac26f93ff 100644 --- a/Greenshot/Destinations/PrinterDestination.cs +++ b/Greenshot/Destinations/PrinterDestination.cs @@ -71,8 +71,8 @@ namespace Greenshot.Destinations { return GreenshotPlugin.Core.GreenshotResources.getImage("Printer.Image"); } } - - public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { + + public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { PrinterSettings printerSettings = null; using (Image image = surface.GetImageForExport()) { printerSettings = new PrintHelper(image, captureDetails).PrintWithDialog(); diff --git a/Greenshot/Destinations/WordDestination.cs b/Greenshot/Destinations/WordDestination.cs index a374cedbf..b278d4926 100644 --- a/Greenshot/Destinations/WordDestination.cs +++ b/Greenshot/Destinations/WordDestination.cs @@ -111,8 +111,8 @@ namespace Greenshot.Destinations { yield return new WordDestination(wordCaption); } } - - public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { + + public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { string tmpFile = captureDetails.Filename; if (tmpFile == null || surface.Modified) { using (Image image = surface.GetImageForExport()) { @@ -122,7 +122,19 @@ namespace Greenshot.Destinations { if (documentCaption != null) { WordExporter.InsertIntoExistingDocument(documentCaption, tmpFile); } else { - WordExporter.InsertIntoNewDocument(tmpFile); + bool exported = false; + if (!manuallyInitiated) { + // Insert into current document, if only one is open! + List currentDocuments = WordExporter.GetWordDocuments(); + if (currentDocuments.Count == 1) { + WordExporter.InsertIntoExistingDocument(currentDocuments[0], tmpFile); + exported = true; + } + } + if (!exported) { + WordExporter.InsertIntoNewDocument(tmpFile); + } + } surface.SendMessageEvent(this, SurfaceMessageTyp.Info, lang.GetFormattedString(LangKey.exported_to, Description)); surface.Modified = false; diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs index 7d2f5ac9d..d063f0c5c 100644 --- a/Greenshot/Forms/ImageEditorForm.cs +++ b/Greenshot/Forms/ImageEditorForm.cs @@ -181,12 +181,12 @@ namespace Greenshot { defaultItem.Tag = toolstripDestination; defaultItem.Image = toolstripDestination.DisplayIcon; defaultItem.Click += delegate { - toolstripDestination.ExportCapture(surface, surface.CaptureDetails); + toolstripDestination.ExportCapture(true, surface, surface.CaptureDetails); }; // The ButtonClick, this is for the icon, gets the current default item destinationButton.ButtonClick += delegate(object sender, EventArgs e) { - toolstripDestination.ExportCapture(surface, surface.CaptureDetails); + toolstripDestination.ExportCapture(true, surface, surface.CaptureDetails); }; // Generate the entries for the drop down @@ -204,7 +204,7 @@ namespace Greenshot { destinationMenuItem.Tag = closureFixedDestination; destinationMenuItem.Image = closureFixedDestination.DisplayIcon; destinationMenuItem.Click += delegate { - closureFixedDestination.ExportCapture(surface, surface.CaptureDetails); + closureFixedDestination.ExportCapture(true, surface, surface.CaptureDetails); }; destinationButton.DropDownItems.Add(destinationMenuItem); } @@ -221,7 +221,7 @@ namespace Greenshot { destinationButton.Text = toolstripDestination.Description; destinationButton.Image = toolstripDestination.DisplayIcon; destinationButton.Click += delegate(object sender, EventArgs e) { - toolstripDestination.ExportCapture(surface, surface.CaptureDetails); + toolstripDestination.ExportCapture(true, surface, surface.CaptureDetails); }; } } @@ -474,17 +474,17 @@ namespace Greenshot { if (surface.LastSaveFullPath == null) { destinationDesignation = Destinations.FileWithDialogDestination.DESIGNATION; } - DestinationHelper.ExportCapture(destinationDesignation, surface, surface.CaptureDetails); + DestinationHelper.ExportCapture(true, destinationDesignation, surface, surface.CaptureDetails); } void BtnClipboardClick(object sender, EventArgs e) { - DestinationHelper.ExportCapture(Destinations.ClipboardDestination.DESIGNATION, surface, surface.CaptureDetails); + DestinationHelper.ExportCapture(true, Destinations.ClipboardDestination.DESIGNATION, surface, surface.CaptureDetails); } void BtnPrintClick(object sender, EventArgs e) { // The BeginInvoke is a solution for the printdialog not having focus this.BeginInvoke((MethodInvoker) delegate { - DestinationHelper.ExportCapture(Destinations.PrinterDestination.DESIGNATION, surface, surface.CaptureDetails); + DestinationHelper.ExportCapture(true, Destinations.PrinterDestination.DESIGNATION, surface, surface.CaptureDetails); }); } @@ -1105,7 +1105,7 @@ namespace Greenshot { clickedDestination = (IDestination)clickedMenuItem.Tag; } if (clickedDestination != null) { - if (clickedDestination.ExportCapture(surface, surface.CaptureDetails)) { + if (clickedDestination.ExportCapture(true, surface, surface.CaptureDetails)) { surface.Modified = false; } } diff --git a/Greenshot/Helpers/CaptureHelper.cs b/Greenshot/Helpers/CaptureHelper.cs index faa82f29d..412533b2c 100644 --- a/Greenshot/Helpers/CaptureHelper.cs +++ b/Greenshot/Helpers/CaptureHelper.cs @@ -484,7 +484,7 @@ namespace Greenshot.Helpers { bool canDisposeSurface = true; if (captureDetails.HasDestination(Destinations.PickerDestination.DESIGNATION)) { - DestinationHelper.ExportCapture(Destinations.PickerDestination.DESIGNATION, surface, captureDetails); + DestinationHelper.ExportCapture(false, Destinations.PickerDestination.DESIGNATION, surface, captureDetails); captureDetails.CaptureDestinations.Clear(); canDisposeSurface = false; } @@ -505,7 +505,7 @@ namespace Greenshot.Helpers { } LOG.InfoFormat("Calling destination {0}", destination.Description); - bool destinationOk = destination.ExportCapture(surface, captureDetails); + bool destinationOk = destination.ExportCapture(false, surface, captureDetails); if (Destinations.EditorDestination.DESIGNATION.Equals(destination.Designation) && destinationOk) { canDisposeSurface = false; } diff --git a/Greenshot/Helpers/DestinationHelper.cs b/Greenshot/Helpers/DestinationHelper.cs index 6535b8a38..d14bb5d07 100644 --- a/Greenshot/Helpers/DestinationHelper.cs +++ b/Greenshot/Helpers/DestinationHelper.cs @@ -112,11 +112,11 @@ namespace Greenshot.Helpers { /// /// /// - public static void ExportCapture(string designation, ISurface surface, ICaptureDetails captureDetails) { + public static void ExportCapture(bool manuallyInitiated, string designation, ISurface surface, ICaptureDetails captureDetails) { if (RegisteredDestinations.ContainsKey(designation)) { IDestination destination = RegisteredDestinations[designation]; if (destination.isActive) { - if (destination.ExportCapture(surface, captureDetails)) { + if (destination.ExportCapture(manuallyInitiated, surface, captureDetails)) { // Export worked, set the modified flag surface.Modified = false; } diff --git a/GreenshotConfluencePlugin/ConfluenceDestination.cs b/GreenshotConfluencePlugin/ConfluenceDestination.cs index 71ea6af34..89cdf964d 100644 --- a/GreenshotConfluencePlugin/ConfluenceDestination.cs +++ b/GreenshotConfluencePlugin/ConfluenceDestination.cs @@ -106,7 +106,7 @@ namespace GreenshotConfluencePlugin { } } - public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { + public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { // force password check to take place before the pages load if (!ConfluencePlugin.ConfluenceConnector.isLoggedIn) { return false; diff --git a/GreenshotExternalCommandPlugin/ExternalCommandDestination.cs b/GreenshotExternalCommandPlugin/ExternalCommandDestination.cs index d5fe85e3a..2c220d375 100644 --- a/GreenshotExternalCommandPlugin/ExternalCommandDestination.cs +++ b/GreenshotExternalCommandPlugin/ExternalCommandDestination.cs @@ -72,7 +72,7 @@ namespace ExternalCommand { } } - public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { + public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { string fullPath = captureDetails.Filename; if (fullPath == null) { using (Image image = surface.GetImageForExport()) { diff --git a/GreenshotImgurPlugin/ImgurDestination.cs b/GreenshotImgurPlugin/ImgurDestination.cs index aa783d42a..d0ee88bb6 100644 --- a/GreenshotImgurPlugin/ImgurDestination.cs +++ b/GreenshotImgurPlugin/ImgurDestination.cs @@ -65,7 +65,7 @@ namespace GreenshotImgurPlugin { } } - public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { + public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { using (Image image = surface.GetImageForExport()) { bool uploaded = plugin.Upload(captureDetails, image); if (uploaded) { diff --git a/GreenshotInterop/OfficeExport/WordExporter.cs b/GreenshotInterop/OfficeExport/WordExporter.cs index 0ae2694f2..ee9dccf79 100644 --- a/GreenshotInterop/OfficeExport/WordExporter.cs +++ b/GreenshotInterop/OfficeExport/WordExporter.cs @@ -60,6 +60,9 @@ namespace Greenshot.Interop.Office { LOG.WarnFormat("Couldn't set zoom to 100, error: {0}", e.Message); } } + wordDocument.Application.Activate(); + wordDocument.Activate(); + wordDocument.ActiveWindow.Activate(); return true; } return false; @@ -67,22 +70,24 @@ namespace Greenshot.Interop.Office { private static void AddPictureToSelection(ISelection selection, string tmpFile) { selection.InlineShapes.AddPicture(tmpFile, Type.Missing, Type.Missing, Type.Missing); - //selection.InsertAfter("blablub\r\n"); + selection.InsertAfter("\r\n"); } public static void InsertIntoNewDocument(string tmpFile) { using (IWordApplication wordApplication = COMWrapper.GetOrCreateInstance()) { if (wordApplication != null) { wordApplication.Visible = true; - + wordApplication.Activate(); // Create new Document object template = string.Empty; object newTemplate = false; object documentType = 0; object documentVisible = true; - wordApplication.Documents.Add(ref template, ref newTemplate, ref documentType, ref documentVisible); + IWordDocument wordDocument = wordApplication.Documents.Add(ref template, ref newTemplate, ref documentType, ref documentVisible); // Add Picture AddPictureToSelection(wordApplication.Selection, tmpFile); + wordDocument.Activate(); + wordDocument.ActiveWindow.Activate(); } } } diff --git a/GreenshotInterop/OfficeInterop/WordInterop.cs b/GreenshotInterop/OfficeInterop/WordInterop.cs index df22ff375..559c08dd8 100644 --- a/GreenshotInterop/OfficeInterop/WordInterop.cs +++ b/GreenshotInterop/OfficeInterop/WordInterop.cs @@ -30,23 +30,26 @@ namespace Greenshot.Interop.Office { ISelection Selection { get; } IDocuments Documents { get; } bool Visible { get; set; } + void Activate(); } // See: http://msdn.microsoft.com/de-de/library/microsoft.office.interop.word.documents_members(v=office.11).aspx public interface IDocuments : Common, Collection { - void Add(ref object Template, ref object NewTemplate, ref object DocumentType, ref object Visible); + IWordDocument Add(ref object Template, ref object NewTemplate, ref object DocumentType, ref object Visible); IWordDocument item(int index); } // See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.document.aspx public interface IWordDocument : Common { + void Activate(); IWordApplication Application { get; } - Window ActiveWindow { get; } + WordWindow ActiveWindow { get; } } // See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.window_members.aspx - public interface Window : Common { + public interface WordWindow : Common { Pane ActivePane { get; } + void Activate(); string Caption { get; } diff --git a/GreenshotJiraPlugin/JiraDestination.cs b/GreenshotJiraPlugin/JiraDestination.cs index 4424dc97e..dcdde3c37 100644 --- a/GreenshotJiraPlugin/JiraDestination.cs +++ b/GreenshotJiraPlugin/JiraDestination.cs @@ -98,8 +98,8 @@ namespace GreenshotJiraPlugin { } } } - - public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { + + public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { string filename = Path.GetFileName(jiraPlugin.Host.GetFilename(config.UploadFormat, captureDetails)); byte[] buffer; if (jira != null) { diff --git a/GreenshotPlugin/Core/AbstractDestination.cs b/GreenshotPlugin/Core/AbstractDestination.cs index c110895cb..779d36ceb 100644 --- a/GreenshotPlugin/Core/AbstractDestination.cs +++ b/GreenshotPlugin/Core/AbstractDestination.cs @@ -172,7 +172,7 @@ namespace GreenshotPlugin.Core { } } - public abstract bool ExportCapture(ISurface surface, ICaptureDetails captureDetails); + public abstract bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails); public override string ToString() { return Description; diff --git a/GreenshotPlugin/Interfaces/IDestination.cs b/GreenshotPlugin/Interfaces/IDestination.cs index 06080c7ae..2dbac489f 100644 --- a/GreenshotPlugin/Interfaces/IDestination.cs +++ b/GreenshotPlugin/Interfaces/IDestination.cs @@ -92,9 +92,10 @@ namespace Greenshot.Plugin { /// /// If a capture is made, and the destination is enabled, this method is called. /// + /// true if the user selected this destination from a GUI, false if it was called as part of a process /// /// /// true if the destination has "exported" the capture - bool ExportCapture(ISurface surface, ICaptureDetails captureDetails); + bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails); } } diff --git a/PluginExample/SimpleOutputDestination.cs b/PluginExample/SimpleOutputDestination.cs index b9830cb4a..0c0b47716 100644 --- a/PluginExample/SimpleOutputDestination.cs +++ b/PluginExample/SimpleOutputDestination.cs @@ -61,7 +61,7 @@ namespace PluginExample { } } - public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { + public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { CoreConfiguration config = IniConfig.GetIniSection(); string file = host.GetFilename(OutputFormat.png, null); string filePath = Path.Combine(config.OutputFilePath, file);