Scrolling Capture close setting change

This commit is contained in:
Michael Delpach 2015-10-03 09:29:47 +08:00
parent 841aeee7fe
commit 2e8cf7a161
4 changed files with 7 additions and 5 deletions

View file

@ -251,11 +251,8 @@ private void StopCapture()
EndingProcess();
isCapturing = false;
if (Options.AutoUpload)
{
StartProcess();
Close();
}
if (Options.AutoUpload) StartProcess();
if (Options.AutoClose) Close();
}
private void Clean()

View file

@ -40,6 +40,7 @@ public class ScrollingCaptureOptions
public bool RemoveDuplicates { get; set; } = true;
public bool AfterCaptureAutomaticallyCombine { get; set; } = true;
public bool AutoUpload { get; set; } = false;
public bool AutoClose { get; set; } = false;
public int TrimLeftEdge { get; set; } = 0;
public int TrimTopEdge { get; set; } = 0;

View file

@ -453,6 +453,7 @@ public static void OpenScrollingCapture(TaskSettings taskSettings = null, bool f
{
if (taskSettings == null) taskSettings = TaskSettings.GetDefaultTaskSettings();
taskSettings.CaptureSettingsReference.ScrollingCaptureOptions.AutoClose = taskSettings.AdvancedSettings.AutoCloseScrollingCaptureWindow;
ScrollingCaptureForm scrollingCaptureForm = new ScrollingCaptureForm(taskSettings.CaptureSettingsReference.ScrollingCaptureOptions, forceSelection);
scrollingCaptureForm.ProcessRequested += image => UploadManager.RunImageTask(image, taskSettings);
scrollingCaptureForm.Show();

View file

@ -417,6 +417,9 @@ public class TaskSettingsAdvanced
Editor(typeof(DirectoryNameEditor), typeof(UITypeEditor))]
public string CapturePath { get; set; }
[Category("Scrolling capture"), DefaultValue(false), Description("Automatically close scrolling capture window after completing the task.")]
public bool AutoCloseScrollingCaptureWindow { get; set; }
[Category("Upload"), Description("Files with these file extensions will be uploaded using image uploader."),
Editor("System.Windows.Forms.Design.StringCollectionEditor,System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
public List<string> ImageExtensions { get; set; }