mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Added Scrolling capture tab for AutoClose setting
This commit is contained in:
parent
b85d9a3086
commit
4dc9ed8397
6 changed files with 113 additions and 16 deletions
|
@ -24,30 +24,54 @@ You should have received a copy of the GNU General Public License
|
||||||
#endregion License Information (GPL v3)
|
#endregion License Information (GPL v3)
|
||||||
|
|
||||||
using ShareX.ScreenCaptureLib;
|
using ShareX.ScreenCaptureLib;
|
||||||
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace ShareX
|
namespace ShareX
|
||||||
{
|
{
|
||||||
public class ScrollingCaptureOptions
|
public class ScrollingCaptureOptions
|
||||||
{
|
{
|
||||||
|
[DefaultValue(ScrollingCaptureScrollMethod.Automatic)]
|
||||||
public ScrollingCaptureScrollMethod ScrollMethod { get; set; } = ScrollingCaptureScrollMethod.Automatic;
|
public ScrollingCaptureScrollMethod ScrollMethod { get; set; } = ScrollingCaptureScrollMethod.Automatic;
|
||||||
|
|
||||||
|
[DefaultValue(500)]
|
||||||
public int StartDelay { get; set; } = 500;
|
public int StartDelay { get; set; } = 500;
|
||||||
|
|
||||||
|
[DefaultValue(500)]
|
||||||
public int ScrollDelay { get; set; } = 500;
|
public int ScrollDelay { get; set; } = 500;
|
||||||
|
|
||||||
|
[DefaultValue(20)]
|
||||||
public int MaximumScrollCount { get; set; } = 20;
|
public int MaximumScrollCount { get; set; } = 20;
|
||||||
|
|
||||||
|
[DefaultValue(true)]
|
||||||
public bool StartSelectionAutomatically { get; set; } = true;
|
public bool StartSelectionAutomatically { get; set; } = true;
|
||||||
|
|
||||||
|
[DefaultValue(false)]
|
||||||
public bool StartCaptureAutomatically { get; set; } = false;
|
public bool StartCaptureAutomatically { get; set; } = false;
|
||||||
|
|
||||||
|
[DefaultValue(true)]
|
||||||
public bool ScrollTopBeforeCapture { get; set; } = true;
|
public bool ScrollTopBeforeCapture { get; set; } = true;
|
||||||
|
|
||||||
|
[DefaultValue(true)]
|
||||||
public bool AutoDetectScrollEnd { get; set; } = true;
|
public bool AutoDetectScrollEnd { get; set; } = true;
|
||||||
|
|
||||||
|
[DefaultValue(true)]
|
||||||
public bool RemoveDuplicates { get; set; } = true;
|
public bool RemoveDuplicates { get; set; } = true;
|
||||||
|
|
||||||
|
[DefaultValue(true)]
|
||||||
public bool AfterCaptureAutomaticallyCombine { get; set; } = true;
|
public bool AfterCaptureAutomaticallyCombine { get; set; } = true;
|
||||||
|
|
||||||
|
[DefaultValue(false)]
|
||||||
public bool AutoUpload { get; set; } = false;
|
public bool AutoUpload { get; set; } = false;
|
||||||
|
|
||||||
|
[DefaultValue(false), Description("Automatically close scrolling capture window after completing the task.")]
|
||||||
public bool AutoClose { get; set; } = false;
|
public bool AutoClose { get; set; } = false;
|
||||||
|
|
||||||
public int TrimLeftEdge { get; set; } = 0;
|
public int TrimLeftEdge = 0;
|
||||||
public int TrimTopEdge { get; set; } = 0;
|
public int TrimTopEdge = 0;
|
||||||
public int TrimRightEdge { get; set; } = 0;
|
public int TrimRightEdge = 0;
|
||||||
public int TrimBottomEdge { get; set; } = 0;
|
public int TrimBottomEdge = 0;
|
||||||
public int CombineAdjustmentVertical { get; set; } = 0;
|
public int CombineAdjustmentVertical = 0;
|
||||||
public int CombineAdjustmentLastVertical { get; set; } = 0;
|
public int CombineAdjustmentLastVertical = 0;
|
||||||
public int IgnoreLast { get; set; } = 0;
|
public int IgnoreLast = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
22
ShareX/Forms/TaskSettingsForm.Designer.cs
generated
22
ShareX/Forms/TaskSettingsForm.Designer.cs
generated
|
@ -200,6 +200,8 @@ private void InitializeComponent()
|
||||||
this.pgTaskSettings = new System.Windows.Forms.PropertyGrid();
|
this.pgTaskSettings = new System.Windows.Forms.PropertyGrid();
|
||||||
this.chkUseDefaultAdvancedSettings = new System.Windows.Forms.CheckBox();
|
this.chkUseDefaultAdvancedSettings = new System.Windows.Forms.CheckBox();
|
||||||
this.tttvMain = new ShareX.HelpersLib.TabToTreeView();
|
this.tttvMain = new ShareX.HelpersLib.TabToTreeView();
|
||||||
|
this.tpScrollingCapture = new System.Windows.Forms.TabPage();
|
||||||
|
this.pgScrollingCapture = new System.Windows.Forms.PropertyGrid();
|
||||||
this.tcTaskSettings.SuspendLayout();
|
this.tcTaskSettings.SuspendLayout();
|
||||||
this.tpTask.SuspendLayout();
|
this.tpTask.SuspendLayout();
|
||||||
this.cmsDestinations.SuspendLayout();
|
this.cmsDestinations.SuspendLayout();
|
||||||
|
@ -247,6 +249,7 @@ private void InitializeComponent()
|
||||||
this.tpVideoThumbnailer.SuspendLayout();
|
this.tpVideoThumbnailer.SuspendLayout();
|
||||||
this.tpIRCClient.SuspendLayout();
|
this.tpIRCClient.SuspendLayout();
|
||||||
this.tpAdvanced.SuspendLayout();
|
this.tpAdvanced.SuspendLayout();
|
||||||
|
this.tpScrollingCapture.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// cmsAfterCapture
|
// cmsAfterCapture
|
||||||
|
@ -786,6 +789,7 @@ private void InitializeComponent()
|
||||||
this.tcCapture.Controls.Add(this.tpCaptureGeneral);
|
this.tcCapture.Controls.Add(this.tpCaptureGeneral);
|
||||||
this.tcCapture.Controls.Add(this.tpRegionCapture);
|
this.tcCapture.Controls.Add(this.tpRegionCapture);
|
||||||
this.tcCapture.Controls.Add(this.tpScreenRecorder);
|
this.tcCapture.Controls.Add(this.tpScreenRecorder);
|
||||||
|
this.tcCapture.Controls.Add(this.tpScrollingCapture);
|
||||||
this.tcCapture.Controls.Add(this.tpRectangleAnnotate);
|
this.tcCapture.Controls.Add(this.tpRectangleAnnotate);
|
||||||
resources.ApplyResources(this.tcCapture, "tcCapture");
|
resources.ApplyResources(this.tcCapture, "tcCapture");
|
||||||
this.tcCapture.Name = "tcCapture";
|
this.tcCapture.Name = "tcCapture";
|
||||||
|
@ -1655,6 +1659,21 @@ private void InitializeComponent()
|
||||||
this.tttvMain.TreeViewSize = 190;
|
this.tttvMain.TreeViewSize = 190;
|
||||||
this.tttvMain.TabChanged += new ShareX.HelpersLib.TabToTreeView.TabChangedEventHandler(this.tttvMain_TabChanged);
|
this.tttvMain.TabChanged += new ShareX.HelpersLib.TabToTreeView.TabChangedEventHandler(this.tttvMain_TabChanged);
|
||||||
//
|
//
|
||||||
|
// tpScrollingCapture
|
||||||
|
//
|
||||||
|
this.tpScrollingCapture.Controls.Add(this.pgScrollingCapture);
|
||||||
|
resources.ApplyResources(this.tpScrollingCapture, "tpScrollingCapture");
|
||||||
|
this.tpScrollingCapture.Name = "tpScrollingCapture";
|
||||||
|
this.tpScrollingCapture.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// pgScrollingCapture
|
||||||
|
//
|
||||||
|
this.pgScrollingCapture.CategoryForeColor = System.Drawing.SystemColors.InactiveCaptionText;
|
||||||
|
resources.ApplyResources(this.pgScrollingCapture, "pgScrollingCapture");
|
||||||
|
this.pgScrollingCapture.Name = "pgScrollingCapture";
|
||||||
|
this.pgScrollingCapture.PropertySort = System.Windows.Forms.PropertySort.NoSort;
|
||||||
|
this.pgScrollingCapture.ToolbarVisible = false;
|
||||||
|
//
|
||||||
// TaskSettingsForm
|
// TaskSettingsForm
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this, "$this");
|
resources.ApplyResources(this, "$this");
|
||||||
|
@ -1730,6 +1749,7 @@ private void InitializeComponent()
|
||||||
this.tpIRCClient.ResumeLayout(false);
|
this.tpIRCClient.ResumeLayout(false);
|
||||||
this.tpAdvanced.ResumeLayout(false);
|
this.tpAdvanced.ResumeLayout(false);
|
||||||
this.tpAdvanced.PerformLayout();
|
this.tpAdvanced.PerformLayout();
|
||||||
|
this.tpScrollingCapture.ResumeLayout(false);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1906,5 +1926,7 @@ private void InitializeComponent()
|
||||||
private System.Windows.Forms.PropertyGrid pgVideoThumbnailer;
|
private System.Windows.Forms.PropertyGrid pgVideoThumbnailer;
|
||||||
private System.Windows.Forms.TabPage tpIRCClient;
|
private System.Windows.Forms.TabPage tpIRCClient;
|
||||||
private System.Windows.Forms.PropertyGrid pgIRCClient;
|
private System.Windows.Forms.PropertyGrid pgIRCClient;
|
||||||
|
private System.Windows.Forms.TabPage tpScrollingCapture;
|
||||||
|
private System.Windows.Forms.PropertyGrid pgScrollingCapture;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -235,6 +235,10 @@ public TaskSettingsForm(TaskSettings hotkeySetting, bool isDefault = false)
|
||||||
chkRunScreencastCLI.Checked = cboEncoder.Enabled = btnEncoderConfig.Enabled = TaskSettings.CaptureSettings.RunScreencastCLI;
|
chkRunScreencastCLI.Checked = cboEncoder.Enabled = btnEncoderConfig.Enabled = TaskSettings.CaptureSettings.RunScreencastCLI;
|
||||||
UpdateVideoEncoders();
|
UpdateVideoEncoders();
|
||||||
|
|
||||||
|
// Capture / Scrolling capture
|
||||||
|
if (TaskSettings.CaptureSettings.ScrollingCaptureOptions == null) TaskSettings.CaptureSettings.ScrollingCaptureOptions = new ScrollingCaptureOptions();
|
||||||
|
pgScrollingCapture.SelectedObject = TaskSettings.CaptureSettings.ScrollingCaptureOptions;
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
TaskHelpers.AddDefaultExternalPrograms(TaskSettings);
|
TaskHelpers.AddDefaultExternalPrograms(TaskSettings);
|
||||||
TaskSettings.ExternalPrograms.ForEach(AddFileAction);
|
TaskSettings.ExternalPrograms.ForEach(AddFileAction);
|
||||||
|
|
|
@ -1187,7 +1187,7 @@
|
||||||
</data>
|
</data>
|
||||||
<data name="lblImageJPEGQualityHint.Text" xml:space="preserve">
|
<data name="lblImageJPEGQualityHint.Text" xml:space="preserve">
|
||||||
<value>0 - 100</value>
|
<value>0 - 100</value>
|
||||||
<comment>@Invariant</comment></data>
|
</data>
|
||||||
<data name=">>lblImageJPEGQualityHint.Name" xml:space="preserve">
|
<data name=">>lblImageJPEGQualityHint.Name" xml:space="preserve">
|
||||||
<value>lblImageJPEGQualityHint</value>
|
<value>lblImageJPEGQualityHint</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -1817,7 +1817,7 @@
|
||||||
</data>
|
</data>
|
||||||
<data name="btnCaptureTransmitBoundsFromMonitorToCustomBounds.Text" xml:space="preserve">
|
<data name="btnCaptureTransmitBoundsFromMonitorToCustomBounds.Text" xml:space="preserve">
|
||||||
<value>>></value>
|
<value>>></value>
|
||||||
<comment>@Invariant</comment></data>
|
</data>
|
||||||
<data name=">>btnCaptureTransmitBoundsFromMonitorToCustomBounds.Name" xml:space="preserve">
|
<data name=">>btnCaptureTransmitBoundsFromMonitorToCustomBounds.Name" xml:space="preserve">
|
||||||
<value>btnCaptureTransmitBoundsFromMonitorToCustomBounds</value>
|
<value>btnCaptureTransmitBoundsFromMonitorToCustomBounds</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -1907,7 +1907,7 @@
|
||||||
</data>
|
</data>
|
||||||
<data name="lblCaptureCustomRegionY.Text" xml:space="preserve">
|
<data name="lblCaptureCustomRegionY.Text" xml:space="preserve">
|
||||||
<value>Y</value>
|
<value>Y</value>
|
||||||
<comment>@Invariant</comment></data>
|
</data>
|
||||||
<data name=">>lblCaptureCustomRegionY.Name" xml:space="preserve">
|
<data name=">>lblCaptureCustomRegionY.Name" xml:space="preserve">
|
||||||
<value>lblCaptureCustomRegionY</value>
|
<value>lblCaptureCustomRegionY</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -1937,7 +1937,7 @@
|
||||||
</data>
|
</data>
|
||||||
<data name="lblCaptureCustomRegionX.Text" xml:space="preserve">
|
<data name="lblCaptureCustomRegionX.Text" xml:space="preserve">
|
||||||
<value>X</value>
|
<value>X</value>
|
||||||
<comment>@Invariant</comment></data>
|
</data>
|
||||||
<data name=">>lblCaptureCustomRegionX.Name" xml:space="preserve">
|
<data name=">>lblCaptureCustomRegionX.Name" xml:space="preserve">
|
||||||
<value>lblCaptureCustomRegionX</value>
|
<value>lblCaptureCustomRegionX</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -2994,6 +2994,57 @@
|
||||||
<data name=">>tpScreenRecorder.ZOrder" xml:space="preserve">
|
<data name=">>tpScreenRecorder.ZOrder" xml:space="preserve">
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="pgScrollingCapture.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||||
|
<value>Fill</value>
|
||||||
|
</data>
|
||||||
|
<data name="pgScrollingCapture.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>3, 3</value>
|
||||||
|
</data>
|
||||||
|
<data name="pgScrollingCapture.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>551, 322</value>
|
||||||
|
</data>
|
||||||
|
<data name="pgScrollingCapture.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>pgScrollingCapture.Name" xml:space="preserve">
|
||||||
|
<value>pgScrollingCapture</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>pgScrollingCapture.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.PropertyGrid, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>pgScrollingCapture.Parent" xml:space="preserve">
|
||||||
|
<value>tpScrollingCapture</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>pgScrollingCapture.ZOrder" xml:space="preserve">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
|
<data name="tpScrollingCapture.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>4, 22</value>
|
||||||
|
</data>
|
||||||
|
<data name="tpScrollingCapture.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||||
|
<value>3, 3, 3, 3</value>
|
||||||
|
</data>
|
||||||
|
<data name="tpScrollingCapture.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>557, 328</value>
|
||||||
|
</data>
|
||||||
|
<data name="tpScrollingCapture.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>4</value>
|
||||||
|
</data>
|
||||||
|
<data name="tpScrollingCapture.Text" xml:space="preserve">
|
||||||
|
<value>Scrolling capture</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>tpScrollingCapture.Name" xml:space="preserve">
|
||||||
|
<value>tpScrollingCapture</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>tpScrollingCapture.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>tpScrollingCapture.Parent" xml:space="preserve">
|
||||||
|
<value>tcCapture</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>tpScrollingCapture.ZOrder" xml:space="preserve">
|
||||||
|
<value>3</value>
|
||||||
|
</data>
|
||||||
<data name="pgRectangleAnnotate.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
<data name="pgRectangleAnnotate.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||||
<value>Fill</value>
|
<value>Fill</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -3043,7 +3094,7 @@
|
||||||
<value>tcCapture</value>
|
<value>tcCapture</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>tpRectangleAnnotate.ZOrder" xml:space="preserve">
|
<data name=">>tpRectangleAnnotate.ZOrder" xml:space="preserve">
|
||||||
<value>3</value>
|
<value>4</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tcCapture.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
<data name="tcCapture.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||||
<value>Fill</value>
|
<value>Fill</value>
|
||||||
|
|
|
@ -453,7 +453,6 @@ public static void OpenScrollingCapture(TaskSettings taskSettings = null, bool f
|
||||||
{
|
{
|
||||||
if (taskSettings == null) taskSettings = TaskSettings.GetDefaultTaskSettings();
|
if (taskSettings == null) taskSettings = TaskSettings.GetDefaultTaskSettings();
|
||||||
|
|
||||||
taskSettings.CaptureSettingsReference.ScrollingCaptureOptions.AutoClose = taskSettings.AdvancedSettings.AutoCloseScrollingCaptureWindow;
|
|
||||||
ScrollingCaptureForm scrollingCaptureForm = new ScrollingCaptureForm(taskSettings.CaptureSettingsReference.ScrollingCaptureOptions, forceSelection);
|
ScrollingCaptureForm scrollingCaptureForm = new ScrollingCaptureForm(taskSettings.CaptureSettingsReference.ScrollingCaptureOptions, forceSelection);
|
||||||
scrollingCaptureForm.ProcessRequested += image => UploadManager.RunImageTask(image, taskSettings);
|
scrollingCaptureForm.ProcessRequested += image => UploadManager.RunImageTask(image, taskSettings);
|
||||||
scrollingCaptureForm.Show();
|
scrollingCaptureForm.Show();
|
||||||
|
|
|
@ -417,9 +417,6 @@ public class TaskSettingsAdvanced
|
||||||
Editor(typeof(DirectoryNameEditor), typeof(UITypeEditor))]
|
Editor(typeof(DirectoryNameEditor), typeof(UITypeEditor))]
|
||||||
public string CapturePath { get; set; }
|
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."),
|
[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))]
|
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; }
|
public List<string> ImageExtensions { get; set; }
|
||||||
|
|
Loading…
Reference in a new issue