mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
CLI Video Encoder UI changes
Users are able to preconfigure CLI Video Encoder profiles (with args and output extension) in Applications Settings -> Profiles -> Video Encoders. TaskSettings therefore do not need to carry Video Encoder profile configuration. Users can simply choose one of the Video Encoders without having to reconfigure new encoders in Task Settings and input args again.
This commit is contained in:
parent
6380d013b1
commit
57bbee03d0
14 changed files with 900 additions and 343 deletions
85
HelpersLib/EncoderProgram.cs
Normal file
85
HelpersLib/EncoderProgram.cs
Normal file
|
@ -0,0 +1,85 @@
|
|||
#region License Information (GPL v3)
|
||||
|
||||
/*
|
||||
ShareX - A program that allows you to take screenshots and share any file type
|
||||
Copyright (C) 2008-2014 ShareX Developers
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Optionally you can also view the license at <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#endregion License Information (GPL v3)
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace HelpersLib
|
||||
{
|
||||
public class VideoEncoder
|
||||
{
|
||||
[DefaultValue("x264 encoder to MP4")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[DefaultValue("x264.exe")]
|
||||
public string Path { get; set; }
|
||||
|
||||
[DefaultValue("--output %output %input")]
|
||||
public string Args { get; set; }
|
||||
|
||||
[DefaultValue("mp4")]
|
||||
public string OutputExtension { get; set; }
|
||||
|
||||
public VideoEncoder()
|
||||
{
|
||||
this.ApplyDefaultPropertyValues();
|
||||
}
|
||||
|
||||
/// <param name="sourceFilePath">AVI file path</param>
|
||||
/// <param name="targetFilePath">Target file path without extension</param>
|
||||
public void Encode(string sourceFilePath, string targetFilePath)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(sourceFilePath) && !string.IsNullOrEmpty(targetFilePath))
|
||||
{
|
||||
if (!targetFilePath.EndsWith(OutputExtension))
|
||||
{
|
||||
targetFilePath += "." + OutputExtension.TrimStart('.');
|
||||
}
|
||||
|
||||
Helpers.CreateDirectoryIfNotExist(targetFilePath);
|
||||
|
||||
using (Process process = new Process())
|
||||
{
|
||||
ProcessStartInfo psi = new ProcessStartInfo(Path);
|
||||
psi.Arguments = Args.Replace("%input", "\"" + sourceFilePath + "\"").Replace("%output", "\"" + targetFilePath + "\"");
|
||||
psi.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
process.StartInfo = psi;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Name;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -87,6 +87,7 @@
|
|||
<Compile Include="Colors\RGBA.cs" />
|
||||
<Compile Include="ConvolutionMatrix.cs" />
|
||||
<Compile Include="ConvolutionMatrixManager.cs" />
|
||||
<Compile Include="EncoderProgram.cs" />
|
||||
<Compile Include="FontSafe.cs" />
|
||||
<Compile Include="Helpers\MathHelpers.cs" />
|
||||
<Compile Include="MimeTypes.cs" />
|
||||
|
|
|
@ -209,24 +209,12 @@ public void SaveAsGIF(string path, GIFQuality quality)
|
|||
}
|
||||
}
|
||||
|
||||
public void EncodeUsingCommandLine(string output, string encoderPath, string encoderArguments)
|
||||
public void EncodeUsingCommandLine(VideoEncoder encoder, string targetFilePath)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(CachePath) && File.Exists(CachePath) && !string.IsNullOrEmpty(encoderPath) && File.Exists(encoderPath))
|
||||
if (!string.IsNullOrEmpty(CachePath) && File.Exists(CachePath))
|
||||
{
|
||||
OnEncodingProgressChanged(-1);
|
||||
Helpers.CreateDirectoryIfNotExist(output);
|
||||
|
||||
using (Process process = new Process())
|
||||
{
|
||||
ProcessStartInfo psi = new ProcessStartInfo(encoderPath);
|
||||
encoderArguments = encoderArguments.Replace("%input", "\"" + CachePath + "\"").Replace("%output", "\"" + output + "\"");
|
||||
psi.Arguments = encoderArguments;
|
||||
psi.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
process.StartInfo = psi;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
}
|
||||
|
||||
encoder.Encode(CachePath, targetFilePath);
|
||||
OnEncodingProgressChanged(100);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,6 +103,13 @@ public ApplicationConfig()
|
|||
|
||||
#endregion Print
|
||||
|
||||
#region Profiles
|
||||
|
||||
public List<VideoEncoder> VideoEncoders = new List<VideoEncoder>();
|
||||
public int VideoEncoderId = 0;
|
||||
|
||||
#endregion Profiles
|
||||
|
||||
#region Advanced
|
||||
|
||||
[Category("Application"), DefaultValue(false), Description("Calculate and show file sizes in binary units (KiB, MiB etc.)")]
|
||||
|
|
176
ShareX/Forms/ApplicationSettingsForm.Designer.cs
generated
176
ShareX/Forms/ApplicationSettingsForm.Designer.cs
generated
|
@ -102,6 +102,17 @@ private void InitializeComponent()
|
|||
this.tpPrint = new System.Windows.Forms.TabPage();
|
||||
this.cbDontShowPrintSettingDialog = new System.Windows.Forms.CheckBox();
|
||||
this.btnShowImagePrintSettings = new System.Windows.Forms.Button();
|
||||
this.tpProfiles = new System.Windows.Forms.TabPage();
|
||||
this.tcProfiles = new System.Windows.Forms.TabControl();
|
||||
this.tpEncodersCLI = new System.Windows.Forms.TabPage();
|
||||
this.lvEncoders = new HelpersLib.MyListView();
|
||||
this.chEncoderDescription = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.chEncoderPath = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.chEncoderArgs = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.chEncoderOutputExtension = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.btnEncodersAdd = new System.Windows.Forms.Button();
|
||||
this.btnEncodersEdit = new System.Windows.Forms.Button();
|
||||
this.btnEncodersRemove = new System.Windows.Forms.Button();
|
||||
this.tpAdvanced = new System.Windows.Forms.TabPage();
|
||||
this.pgSettings = new System.Windows.Forms.PropertyGrid();
|
||||
this.tcSettings.SuspendLayout();
|
||||
|
@ -123,6 +134,9 @@ private void InitializeComponent()
|
|||
this.gbSecondaryTextUploaders.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudRetryUpload)).BeginInit();
|
||||
this.tpPrint.SuspendLayout();
|
||||
this.tpProfiles.SuspendLayout();
|
||||
this.tcProfiles.SuspendLayout();
|
||||
this.tpEncodersCLI.SuspendLayout();
|
||||
this.tpAdvanced.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
|
@ -133,12 +147,13 @@ private void InitializeComponent()
|
|||
this.tcSettings.Controls.Add(this.tpProxy);
|
||||
this.tcSettings.Controls.Add(this.tpUpload);
|
||||
this.tcSettings.Controls.Add(this.tpPrint);
|
||||
this.tcSettings.Controls.Add(this.tpProfiles);
|
||||
this.tcSettings.Controls.Add(this.tpAdvanced);
|
||||
this.tcSettings.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tcSettings.Location = new System.Drawing.Point(3, 3);
|
||||
this.tcSettings.Name = "tcSettings";
|
||||
this.tcSettings.SelectedIndex = 0;
|
||||
this.tcSettings.Size = new System.Drawing.Size(618, 396);
|
||||
this.tcSettings.Size = new System.Drawing.Size(618, 395);
|
||||
this.tcSettings.TabIndex = 0;
|
||||
//
|
||||
// tpGeneral
|
||||
|
@ -155,7 +170,7 @@ private void InitializeComponent()
|
|||
this.tpGeneral.Location = new System.Drawing.Point(4, 22);
|
||||
this.tpGeneral.Name = "tpGeneral";
|
||||
this.tpGeneral.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tpGeneral.Size = new System.Drawing.Size(610, 370);
|
||||
this.tpGeneral.Size = new System.Drawing.Size(610, 369);
|
||||
this.tpGeneral.TabIndex = 0;
|
||||
this.tpGeneral.Text = "General";
|
||||
this.tpGeneral.UseVisualStyleBackColor = true;
|
||||
|
@ -554,7 +569,7 @@ private void InitializeComponent()
|
|||
this.tpUpload.Location = new System.Drawing.Point(4, 22);
|
||||
this.tpUpload.Name = "tpUpload";
|
||||
this.tpUpload.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tpUpload.Size = new System.Drawing.Size(610, 370);
|
||||
this.tpUpload.Size = new System.Drawing.Size(610, 369);
|
||||
this.tpUpload.TabIndex = 3;
|
||||
this.tpUpload.Text = "Upload";
|
||||
this.tpUpload.UseVisualStyleBackColor = true;
|
||||
|
@ -568,7 +583,7 @@ private void InitializeComponent()
|
|||
this.tcUpload.Location = new System.Drawing.Point(3, 3);
|
||||
this.tcUpload.Name = "tcUpload";
|
||||
this.tcUpload.SelectedIndex = 0;
|
||||
this.tcUpload.Size = new System.Drawing.Size(604, 364);
|
||||
this.tcUpload.Size = new System.Drawing.Size(604, 363);
|
||||
this.tcUpload.TabIndex = 3;
|
||||
//
|
||||
// tpPerformance
|
||||
|
@ -577,7 +592,7 @@ private void InitializeComponent()
|
|||
this.tpPerformance.Location = new System.Drawing.Point(4, 22);
|
||||
this.tpPerformance.Name = "tpPerformance";
|
||||
this.tpPerformance.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tpPerformance.Size = new System.Drawing.Size(596, 338);
|
||||
this.tpPerformance.Size = new System.Drawing.Size(596, 337);
|
||||
this.tpPerformance.TabIndex = 0;
|
||||
this.tpPerformance.Text = "Performance";
|
||||
this.tpPerformance.UseVisualStyleBackColor = true;
|
||||
|
@ -591,7 +606,7 @@ private void InitializeComponent()
|
|||
this.gbBandwidth.Controls.Add(this.cbBufferSize);
|
||||
this.gbBandwidth.Location = new System.Drawing.Point(8, 8);
|
||||
this.gbBandwidth.Name = "gbBandwidth";
|
||||
this.gbBandwidth.Size = new System.Drawing.Size(488, 88);
|
||||
this.gbBandwidth.Size = new System.Drawing.Size(576, 88);
|
||||
this.gbBandwidth.TabIndex = 1;
|
||||
this.gbBandwidth.TabStop = false;
|
||||
this.gbBandwidth.Text = "Bandwidth";
|
||||
|
@ -658,7 +673,7 @@ private void InitializeComponent()
|
|||
this.tpUploadResults.Location = new System.Drawing.Point(4, 22);
|
||||
this.tpUploadResults.Name = "tpUploadResults";
|
||||
this.tpUploadResults.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tpUploadResults.Size = new System.Drawing.Size(596, 338);
|
||||
this.tpUploadResults.Size = new System.Drawing.Size(596, 337);
|
||||
this.tpUploadResults.TabIndex = 1;
|
||||
this.tpUploadResults.Text = "Results";
|
||||
this.tpUploadResults.UseVisualStyleBackColor = true;
|
||||
|
@ -671,7 +686,7 @@ private void InitializeComponent()
|
|||
this.gbClipboardFormats.Controls.Add(this.lvClipboardFormats);
|
||||
this.gbClipboardFormats.Location = new System.Drawing.Point(8, 8);
|
||||
this.gbClipboardFormats.Name = "gbClipboardFormats";
|
||||
this.gbClipboardFormats.Size = new System.Drawing.Size(488, 160);
|
||||
this.gbClipboardFormats.Size = new System.Drawing.Size(576, 168);
|
||||
this.gbClipboardFormats.TabIndex = 2;
|
||||
this.gbClipboardFormats.TabStop = false;
|
||||
this.gbClipboardFormats.Text = "Clipboard Formats";
|
||||
|
@ -714,7 +729,7 @@ private void InitializeComponent()
|
|||
this.lvClipboardFormats.FullRowSelect = true;
|
||||
this.lvClipboardFormats.Location = new System.Drawing.Point(8, 48);
|
||||
this.lvClipboardFormats.Name = "lvClipboardFormats";
|
||||
this.lvClipboardFormats.Size = new System.Drawing.Size(472, 104);
|
||||
this.lvClipboardFormats.Size = new System.Drawing.Size(552, 104);
|
||||
this.lvClipboardFormats.TabIndex = 3;
|
||||
this.lvClipboardFormats.UseCompatibleStateImageBehavior = false;
|
||||
this.lvClipboardFormats.View = System.Windows.Forms.View.Details;
|
||||
|
@ -739,7 +754,7 @@ private void InitializeComponent()
|
|||
this.tpUploadRetry.Location = new System.Drawing.Point(4, 22);
|
||||
this.tpUploadRetry.Name = "tpUploadRetry";
|
||||
this.tpUploadRetry.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tpUploadRetry.Size = new System.Drawing.Size(596, 338);
|
||||
this.tpUploadRetry.Size = new System.Drawing.Size(596, 337);
|
||||
this.tpUploadRetry.TabIndex = 2;
|
||||
this.tpUploadRetry.Text = "Retry";
|
||||
this.tpUploadRetry.UseVisualStyleBackColor = true;
|
||||
|
@ -771,7 +786,7 @@ private void InitializeComponent()
|
|||
this.tlpBackupDestinations.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.tlpBackupDestinations.RowCount = 1;
|
||||
this.tlpBackupDestinations.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tlpBackupDestinations.Size = new System.Drawing.Size(590, 295);
|
||||
this.tlpBackupDestinations.Size = new System.Drawing.Size(590, 294);
|
||||
this.tlpBackupDestinations.TabIndex = 5;
|
||||
//
|
||||
// gbSecondaryImageUploaders
|
||||
|
@ -781,7 +796,7 @@ private void InitializeComponent()
|
|||
this.gbSecondaryImageUploaders.Location = new System.Drawing.Point(8, 8);
|
||||
this.gbSecondaryImageUploaders.Name = "gbSecondaryImageUploaders";
|
||||
this.gbSecondaryImageUploaders.Padding = new System.Windows.Forms.Padding(3, 5, 3, 3);
|
||||
this.gbSecondaryImageUploaders.Size = new System.Drawing.Size(185, 279);
|
||||
this.gbSecondaryImageUploaders.Size = new System.Drawing.Size(185, 278);
|
||||
this.gbSecondaryImageUploaders.TabIndex = 3;
|
||||
this.gbSecondaryImageUploaders.TabStop = false;
|
||||
this.gbSecondaryImageUploaders.Text = "Secondary image uploaders";
|
||||
|
@ -800,7 +815,7 @@ private void InitializeComponent()
|
|||
this.lvSecondaryImageUploaders.Location = new System.Drawing.Point(3, 18);
|
||||
this.lvSecondaryImageUploaders.MultiSelect = false;
|
||||
this.lvSecondaryImageUploaders.Name = "lvSecondaryImageUploaders";
|
||||
this.lvSecondaryImageUploaders.Size = new System.Drawing.Size(179, 258);
|
||||
this.lvSecondaryImageUploaders.Size = new System.Drawing.Size(179, 257);
|
||||
this.lvSecondaryImageUploaders.TabIndex = 0;
|
||||
this.lvSecondaryImageUploaders.UseCompatibleStateImageBehavior = false;
|
||||
this.lvSecondaryImageUploaders.View = System.Windows.Forms.View.Details;
|
||||
|
@ -813,7 +828,7 @@ private void InitializeComponent()
|
|||
this.gbSecondaryFileUploaders.Location = new System.Drawing.Point(396, 8);
|
||||
this.gbSecondaryFileUploaders.Name = "gbSecondaryFileUploaders";
|
||||
this.gbSecondaryFileUploaders.Padding = new System.Windows.Forms.Padding(3, 5, 3, 3);
|
||||
this.gbSecondaryFileUploaders.Size = new System.Drawing.Size(186, 279);
|
||||
this.gbSecondaryFileUploaders.Size = new System.Drawing.Size(186, 278);
|
||||
this.gbSecondaryFileUploaders.TabIndex = 2;
|
||||
this.gbSecondaryFileUploaders.TabStop = false;
|
||||
this.gbSecondaryFileUploaders.Text = "Secondary file uploaders";
|
||||
|
@ -831,7 +846,7 @@ private void InitializeComponent()
|
|||
this.lvSecondaryFileUploaders.Location = new System.Drawing.Point(3, 18);
|
||||
this.lvSecondaryFileUploaders.MultiSelect = false;
|
||||
this.lvSecondaryFileUploaders.Name = "lvSecondaryFileUploaders";
|
||||
this.lvSecondaryFileUploaders.Size = new System.Drawing.Size(180, 258);
|
||||
this.lvSecondaryFileUploaders.Size = new System.Drawing.Size(180, 257);
|
||||
this.lvSecondaryFileUploaders.TabIndex = 1;
|
||||
this.lvSecondaryFileUploaders.UseCompatibleStateImageBehavior = false;
|
||||
this.lvSecondaryFileUploaders.View = System.Windows.Forms.View.Details;
|
||||
|
@ -844,7 +859,7 @@ private void InitializeComponent()
|
|||
this.gbSecondaryTextUploaders.Location = new System.Drawing.Point(199, 8);
|
||||
this.gbSecondaryTextUploaders.Name = "gbSecondaryTextUploaders";
|
||||
this.gbSecondaryTextUploaders.Padding = new System.Windows.Forms.Padding(3, 5, 3, 3);
|
||||
this.gbSecondaryTextUploaders.Size = new System.Drawing.Size(191, 279);
|
||||
this.gbSecondaryTextUploaders.Size = new System.Drawing.Size(191, 278);
|
||||
this.gbSecondaryTextUploaders.TabIndex = 1;
|
||||
this.gbSecondaryTextUploaders.TabStop = false;
|
||||
this.gbSecondaryTextUploaders.Text = "Secondary text uploaders";
|
||||
|
@ -862,7 +877,7 @@ private void InitializeComponent()
|
|||
this.lvSecondaryTextUploaders.Location = new System.Drawing.Point(3, 18);
|
||||
this.lvSecondaryTextUploaders.MultiSelect = false;
|
||||
this.lvSecondaryTextUploaders.Name = "lvSecondaryTextUploaders";
|
||||
this.lvSecondaryTextUploaders.Size = new System.Drawing.Size(185, 258);
|
||||
this.lvSecondaryTextUploaders.Size = new System.Drawing.Size(185, 257);
|
||||
this.lvSecondaryTextUploaders.TabIndex = 1;
|
||||
this.lvSecondaryTextUploaders.UseCompatibleStateImageBehavior = false;
|
||||
this.lvSecondaryTextUploaders.View = System.Windows.Forms.View.Details;
|
||||
|
@ -897,7 +912,7 @@ private void InitializeComponent()
|
|||
this.tpPrint.Location = new System.Drawing.Point(4, 22);
|
||||
this.tpPrint.Name = "tpPrint";
|
||||
this.tpPrint.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tpPrint.Size = new System.Drawing.Size(610, 370);
|
||||
this.tpPrint.Size = new System.Drawing.Size(610, 369);
|
||||
this.tpPrint.TabIndex = 4;
|
||||
this.tpPrint.Text = "Print";
|
||||
this.tpPrint.UseVisualStyleBackColor = true;
|
||||
|
@ -923,13 +938,117 @@ private void InitializeComponent()
|
|||
this.btnShowImagePrintSettings.UseVisualStyleBackColor = true;
|
||||
this.btnShowImagePrintSettings.Click += new System.EventHandler(this.btnShowImagePrintSettings_Click);
|
||||
//
|
||||
// tpProfiles
|
||||
//
|
||||
this.tpProfiles.Controls.Add(this.tcProfiles);
|
||||
this.tpProfiles.Location = new System.Drawing.Point(4, 22);
|
||||
this.tpProfiles.Name = "tpProfiles";
|
||||
this.tpProfiles.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tpProfiles.Size = new System.Drawing.Size(610, 369);
|
||||
this.tpProfiles.TabIndex = 6;
|
||||
this.tpProfiles.Text = "Profiles";
|
||||
this.tpProfiles.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tcProfiles
|
||||
//
|
||||
this.tcProfiles.Controls.Add(this.tpEncodersCLI);
|
||||
this.tcProfiles.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tcProfiles.Location = new System.Drawing.Point(3, 3);
|
||||
this.tcProfiles.Name = "tcProfiles";
|
||||
this.tcProfiles.SelectedIndex = 0;
|
||||
this.tcProfiles.Size = new System.Drawing.Size(604, 363);
|
||||
this.tcProfiles.TabIndex = 0;
|
||||
//
|
||||
// tpEncodersCLI
|
||||
//
|
||||
this.tpEncodersCLI.Controls.Add(this.lvEncoders);
|
||||
this.tpEncodersCLI.Controls.Add(this.btnEncodersAdd);
|
||||
this.tpEncodersCLI.Controls.Add(this.btnEncodersEdit);
|
||||
this.tpEncodersCLI.Controls.Add(this.btnEncodersRemove);
|
||||
this.tpEncodersCLI.Location = new System.Drawing.Point(4, 22);
|
||||
this.tpEncodersCLI.Name = "tpEncodersCLI";
|
||||
this.tpEncodersCLI.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tpEncodersCLI.Size = new System.Drawing.Size(596, 337);
|
||||
this.tpEncodersCLI.TabIndex = 0;
|
||||
this.tpEncodersCLI.Text = "CLI Encoders";
|
||||
this.tpEncodersCLI.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// lvEncoders
|
||||
//
|
||||
this.lvEncoders.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lvEncoders.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.chEncoderDescription,
|
||||
this.chEncoderPath,
|
||||
this.chEncoderArgs,
|
||||
this.chEncoderOutputExtension});
|
||||
this.lvEncoders.FullRowSelect = true;
|
||||
this.lvEncoders.Location = new System.Drawing.Point(8, 40);
|
||||
this.lvEncoders.MultiSelect = false;
|
||||
this.lvEncoders.Name = "lvEncoders";
|
||||
this.lvEncoders.Size = new System.Drawing.Size(576, 288);
|
||||
this.lvEncoders.TabIndex = 4;
|
||||
this.lvEncoders.UseCompatibleStateImageBehavior = false;
|
||||
this.lvEncoders.View = System.Windows.Forms.View.Details;
|
||||
//
|
||||
// chEncoderDescription
|
||||
//
|
||||
this.chEncoderDescription.Text = "Description";
|
||||
this.chEncoderDescription.Width = 137;
|
||||
//
|
||||
// chEncoderPath
|
||||
//
|
||||
this.chEncoderPath.Text = "Path";
|
||||
this.chEncoderPath.Width = 213;
|
||||
//
|
||||
// chEncoderArgs
|
||||
//
|
||||
this.chEncoderArgs.Text = "Args";
|
||||
this.chEncoderArgs.Width = 122;
|
||||
//
|
||||
// chEncoderOutputExtension
|
||||
//
|
||||
this.chEncoderOutputExtension.Text = "Output extension";
|
||||
this.chEncoderOutputExtension.Width = 99;
|
||||
//
|
||||
// btnEncodersAdd
|
||||
//
|
||||
this.btnEncodersAdd.Location = new System.Drawing.Point(8, 8);
|
||||
this.btnEncodersAdd.Name = "btnEncodersAdd";
|
||||
this.btnEncodersAdd.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnEncodersAdd.TabIndex = 0;
|
||||
this.btnEncodersAdd.Text = "Add";
|
||||
this.btnEncodersAdd.UseVisualStyleBackColor = true;
|
||||
this.btnEncodersAdd.Click += new System.EventHandler(this.btnEncodersAdd_Click);
|
||||
//
|
||||
// btnEncodersEdit
|
||||
//
|
||||
this.btnEncodersEdit.Location = new System.Drawing.Point(88, 8);
|
||||
this.btnEncodersEdit.Name = "btnEncodersEdit";
|
||||
this.btnEncodersEdit.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnEncodersEdit.TabIndex = 1;
|
||||
this.btnEncodersEdit.Text = "Edit";
|
||||
this.btnEncodersEdit.UseVisualStyleBackColor = true;
|
||||
this.btnEncodersEdit.Click += new System.EventHandler(this.btnEncodersEdit_Click);
|
||||
//
|
||||
// btnEncodersRemove
|
||||
//
|
||||
this.btnEncodersRemove.Location = new System.Drawing.Point(168, 8);
|
||||
this.btnEncodersRemove.Name = "btnEncodersRemove";
|
||||
this.btnEncodersRemove.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnEncodersRemove.TabIndex = 2;
|
||||
this.btnEncodersRemove.Text = "Remove";
|
||||
this.btnEncodersRemove.UseVisualStyleBackColor = true;
|
||||
this.btnEncodersRemove.Click += new System.EventHandler(this.btnEncodersRemove_Click);
|
||||
//
|
||||
// tpAdvanced
|
||||
//
|
||||
this.tpAdvanced.Controls.Add(this.pgSettings);
|
||||
this.tpAdvanced.Location = new System.Drawing.Point(4, 22);
|
||||
this.tpAdvanced.Name = "tpAdvanced";
|
||||
this.tpAdvanced.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tpAdvanced.Size = new System.Drawing.Size(610, 370);
|
||||
this.tpAdvanced.Size = new System.Drawing.Size(610, 369);
|
||||
this.tpAdvanced.TabIndex = 5;
|
||||
this.tpAdvanced.Text = "Advanced";
|
||||
this.tpAdvanced.UseVisualStyleBackColor = true;
|
||||
|
@ -940,7 +1059,7 @@ private void InitializeComponent()
|
|||
this.pgSettings.Location = new System.Drawing.Point(3, 3);
|
||||
this.pgSettings.Name = "pgSettings";
|
||||
this.pgSettings.PropertySort = System.Windows.Forms.PropertySort.Categorized;
|
||||
this.pgSettings.Size = new System.Drawing.Size(604, 364);
|
||||
this.pgSettings.Size = new System.Drawing.Size(604, 363);
|
||||
this.pgSettings.TabIndex = 0;
|
||||
//
|
||||
// ApplicationSettingsForm
|
||||
|
@ -948,9 +1067,8 @@ private void InitializeComponent()
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.ClientSize = new System.Drawing.Size(624, 402);
|
||||
this.ClientSize = new System.Drawing.Size(624, 401);
|
||||
this.Controls.Add(this.tcSettings);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(640, 440);
|
||||
this.Name = "ApplicationSettingsForm";
|
||||
this.Padding = new System.Windows.Forms.Padding(3);
|
||||
|
@ -985,6 +1103,9 @@ private void InitializeComponent()
|
|||
((System.ComponentModel.ISupportInitialize)(this.nudRetryUpload)).EndInit();
|
||||
this.tpPrint.ResumeLayout(false);
|
||||
this.tpPrint.PerformLayout();
|
||||
this.tpProfiles.ResumeLayout(false);
|
||||
this.tcProfiles.ResumeLayout(false);
|
||||
this.tpEncodersCLI.ResumeLayout(false);
|
||||
this.tpAdvanced.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
|
@ -1069,5 +1190,16 @@ private void InitializeComponent()
|
|||
private System.Windows.Forms.ColumnHeader columnHeader1;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader3;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader2;
|
||||
private System.Windows.Forms.TabPage tpProfiles;
|
||||
private System.Windows.Forms.TabControl tcProfiles;
|
||||
private System.Windows.Forms.TabPage tpEncodersCLI;
|
||||
private System.Windows.Forms.Button btnEncodersAdd;
|
||||
private System.Windows.Forms.Button btnEncodersEdit;
|
||||
private System.Windows.Forms.Button btnEncodersRemove;
|
||||
private MyListView lvEncoders;
|
||||
private System.Windows.Forms.ColumnHeader chEncoderDescription;
|
||||
private System.Windows.Forms.ColumnHeader chEncoderPath;
|
||||
private System.Windows.Forms.ColumnHeader chEncoderArgs;
|
||||
private System.Windows.Forms.ColumnHeader chEncoderOutputExtension;
|
||||
}
|
||||
}
|
|
@ -120,6 +120,9 @@ private void LoadSettings()
|
|||
// Print
|
||||
cbDontShowPrintSettingDialog.Checked = Program.Settings.DontShowPrintSettingsDialog;
|
||||
|
||||
// Profiles
|
||||
Program.Settings.VideoEncoders.ForEach(x => AddVideoEncoder(x));
|
||||
|
||||
// Advanced
|
||||
pgSettings.SelectedObject = Program.Settings;
|
||||
}
|
||||
|
@ -173,6 +176,12 @@ private void UpdatePersonalFolderPathPreview()
|
|||
lblPreviewPersonalFolderPath.Text = personalPath;
|
||||
}
|
||||
|
||||
public void SelectProfilesTab()
|
||||
{
|
||||
tcSettings.SelectedTab = tpProfiles;
|
||||
tcProfiles.SelectedTab = tpEncodersCLI;
|
||||
}
|
||||
|
||||
#region General
|
||||
|
||||
private void cbShowTray_CheckedChanged(object sender, EventArgs e)
|
||||
|
@ -447,5 +456,64 @@ private void btnShowImagePrintSettings_Click(object sender, EventArgs e)
|
|||
}
|
||||
|
||||
#endregion Print
|
||||
|
||||
#region Profiles
|
||||
|
||||
private void btnEncodersAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (EncoderProgramForm form = new EncoderProgramForm())
|
||||
{
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
VideoEncoder encoder = form.encoder;
|
||||
Program.Settings.VideoEncoders.Add(encoder);
|
||||
AddVideoEncoder(encoder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AddVideoEncoder(VideoEncoder encoder)
|
||||
{
|
||||
ListViewItem lvi = new ListViewItem(encoder.Name ?? "");
|
||||
lvi.Tag = encoder;
|
||||
lvi.SubItems.Add(encoder.Path ?? "");
|
||||
lvi.SubItems.Add(encoder.Args ?? "");
|
||||
lvi.SubItems.Add(encoder.OutputExtension ?? "");
|
||||
lvEncoders.Items.Add(lvi);
|
||||
}
|
||||
|
||||
private void btnEncodersEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lvEncoders.SelectedItems.Count > 0)
|
||||
{
|
||||
ListViewItem lvi = lvEncoders.SelectedItems[0];
|
||||
VideoEncoder encoder = lvi.Tag as VideoEncoder;
|
||||
|
||||
using (EncoderProgramForm form = new EncoderProgramForm(encoder))
|
||||
{
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
lvi.Text = encoder.Name ?? "";
|
||||
lvi.SubItems[1].Text = encoder.Path ?? "";
|
||||
lvi.SubItems[2].Text = encoder.Args ?? "";
|
||||
lvi.SubItems[3].Text = encoder.OutputExtension ?? "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void btnEncodersRemove_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lvEncoders.SelectedItems.Count > 0)
|
||||
{
|
||||
ListViewItem lvi = lvEncoders.SelectedItems[0];
|
||||
VideoEncoder encoder = lvi.Tag as VideoEncoder;
|
||||
|
||||
Program.Settings.VideoEncoders.Remove(encoder);
|
||||
lvEncoders.Items.Remove(lvi);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Profiles
|
||||
}
|
||||
}
|
179
ShareX/Forms/EncoderProgramForm.Designer.cs
generated
Normal file
179
ShareX/Forms/EncoderProgramForm.Designer.cs
generated
Normal file
|
@ -0,0 +1,179 @@
|
|||
namespace ShareX
|
||||
{
|
||||
partial class EncoderProgramForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.txtExtension = new System.Windows.Forms.TextBox();
|
||||
this.lblExt = new System.Windows.Forms.Label();
|
||||
this.txtArguments = new System.Windows.Forms.TextBox();
|
||||
this.txtPath = new System.Windows.Forms.TextBox();
|
||||
this.txtName = new System.Windows.Forms.TextBox();
|
||||
this.lblArgs = new System.Windows.Forms.Label();
|
||||
this.lblPath = new System.Windows.Forms.Label();
|
||||
this.lblName = new System.Windows.Forms.Label();
|
||||
this.btnPathBrowse = new System.Windows.Forms.Button();
|
||||
this.btnCancel = new System.Windows.Forms.Button();
|
||||
this.btnOK = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// txtExtension
|
||||
//
|
||||
this.txtExtension.Location = new System.Drawing.Point(88, 80);
|
||||
this.txtExtension.Name = "txtExtension";
|
||||
this.txtExtension.Size = new System.Drawing.Size(224, 20);
|
||||
this.txtExtension.TabIndex = 4;
|
||||
//
|
||||
// lblExt
|
||||
//
|
||||
this.lblExt.AutoSize = true;
|
||||
this.lblExt.Location = new System.Drawing.Point(16, 84);
|
||||
this.lblExt.Name = "lblExt";
|
||||
this.lblExt.Size = new System.Drawing.Size(56, 13);
|
||||
this.lblExt.TabIndex = 9;
|
||||
this.lblExt.Text = "Extension:";
|
||||
//
|
||||
// txtArguments
|
||||
//
|
||||
this.txtArguments.Location = new System.Drawing.Point(88, 56);
|
||||
this.txtArguments.Name = "txtArguments";
|
||||
this.txtArguments.Size = new System.Drawing.Size(224, 20);
|
||||
this.txtArguments.TabIndex = 3;
|
||||
//
|
||||
// txtPath
|
||||
//
|
||||
this.txtPath.Location = new System.Drawing.Point(88, 32);
|
||||
this.txtPath.Name = "txtPath";
|
||||
this.txtPath.Size = new System.Drawing.Size(176, 20);
|
||||
this.txtPath.TabIndex = 1;
|
||||
//
|
||||
// txtName
|
||||
//
|
||||
this.txtName.Location = new System.Drawing.Point(88, 8);
|
||||
this.txtName.Name = "txtName";
|
||||
this.txtName.Size = new System.Drawing.Size(224, 20);
|
||||
this.txtName.TabIndex = 0;
|
||||
//
|
||||
// lblArgs
|
||||
//
|
||||
this.lblArgs.AutoSize = true;
|
||||
this.lblArgs.Location = new System.Drawing.Point(16, 60);
|
||||
this.lblArgs.Name = "lblArgs";
|
||||
this.lblArgs.Size = new System.Drawing.Size(60, 13);
|
||||
this.lblArgs.TabIndex = 15;
|
||||
this.lblArgs.Text = "Arguments:";
|
||||
//
|
||||
// lblPath
|
||||
//
|
||||
this.lblPath.AutoSize = true;
|
||||
this.lblPath.Location = new System.Drawing.Point(16, 36);
|
||||
this.lblPath.Name = "lblPath";
|
||||
this.lblPath.Size = new System.Drawing.Size(32, 13);
|
||||
this.lblPath.TabIndex = 13;
|
||||
this.lblPath.Text = "Path:";
|
||||
//
|
||||
// lblName
|
||||
//
|
||||
this.lblName.AutoSize = true;
|
||||
this.lblName.Location = new System.Drawing.Point(16, 12);
|
||||
this.lblName.Name = "lblName";
|
||||
this.lblName.Size = new System.Drawing.Size(38, 13);
|
||||
this.lblName.TabIndex = 11;
|
||||
this.lblName.Text = "Name:";
|
||||
//
|
||||
// btnPathBrowse
|
||||
//
|
||||
this.btnPathBrowse.Location = new System.Drawing.Point(272, 30);
|
||||
this.btnPathBrowse.Name = "btnPathBrowse";
|
||||
this.btnPathBrowse.Size = new System.Drawing.Size(40, 23);
|
||||
this.btnPathBrowse.TabIndex = 2;
|
||||
this.btnPathBrowse.Text = "...";
|
||||
this.btnPathBrowse.UseVisualStyleBackColor = true;
|
||||
this.btnPathBrowse.Click += new System.EventHandler(this.btnPathBrowse_Click);
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnCancel.Location = new System.Drawing.Point(232, 110);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnCancel.TabIndex = 6;
|
||||
this.btnCancel.Text = "Cancel";
|
||||
this.btnCancel.UseVisualStyleBackColor = true;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
// btnOK
|
||||
//
|
||||
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnOK.Location = new System.Drawing.Point(152, 110);
|
||||
this.btnOK.Name = "btnOK";
|
||||
this.btnOK.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnOK.TabIndex = 5;
|
||||
this.btnOK.Text = "OK";
|
||||
this.btnOK.UseVisualStyleBackColor = true;
|
||||
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||
//
|
||||
// EncoderProgramForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(324, 145);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnOK);
|
||||
this.Controls.Add(this.btnPathBrowse);
|
||||
this.Controls.Add(this.txtArguments);
|
||||
this.Controls.Add(this.txtPath);
|
||||
this.Controls.Add(this.txtName);
|
||||
this.Controls.Add(this.lblArgs);
|
||||
this.Controls.Add(this.lblPath);
|
||||
this.Controls.Add(this.lblName);
|
||||
this.Controls.Add(this.txtExtension);
|
||||
this.Controls.Add(this.lblExt);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "EncoderProgramForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Encoder Program";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox txtExtension;
|
||||
private System.Windows.Forms.Label lblExt;
|
||||
private System.Windows.Forms.TextBox txtArguments;
|
||||
private System.Windows.Forms.TextBox txtPath;
|
||||
private System.Windows.Forms.TextBox txtName;
|
||||
protected System.Windows.Forms.Label lblArgs;
|
||||
protected System.Windows.Forms.Label lblPath;
|
||||
protected System.Windows.Forms.Label lblName;
|
||||
private System.Windows.Forms.Button btnPathBrowse;
|
||||
private System.Windows.Forms.Button btnCancel;
|
||||
private System.Windows.Forms.Button btnOK;
|
||||
}
|
||||
}
|
51
ShareX/Forms/EncoderProgramForm.cs
Normal file
51
ShareX/Forms/EncoderProgramForm.cs
Normal file
|
@ -0,0 +1,51 @@
|
|||
using HelpersLib;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ShareX
|
||||
{
|
||||
public partial class EncoderProgramForm : Form
|
||||
{
|
||||
public VideoEncoder encoder { get; private set; }
|
||||
|
||||
public EncoderProgramForm()
|
||||
: this(new VideoEncoder())
|
||||
{
|
||||
}
|
||||
|
||||
public EncoderProgramForm(VideoEncoder encoder)
|
||||
{
|
||||
this.encoder = encoder;
|
||||
InitializeComponent();
|
||||
txtName.Text = encoder.Name ?? "";
|
||||
txtPath.Text = encoder.Path ?? "";
|
||||
txtArguments.Text = encoder.Args ?? "";
|
||||
txtExtension.Text = encoder.OutputExtension ?? "";
|
||||
}
|
||||
|
||||
private void btnPathBrowse_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.BrowseFile("ShareX - Choose encoder path", txtPath);
|
||||
}
|
||||
|
||||
private void btnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
encoder.Name = txtName.Text;
|
||||
encoder.Path = txtPath.Text;
|
||||
encoder.Args = txtArguments.Text;
|
||||
encoder.OutputExtension = txtExtension.Text;
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
}
|
||||
}
|
120
ShareX/Forms/EncoderProgramForm.resx
Normal file
120
ShareX/Forms/EncoderProgramForm.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
|
@ -147,10 +147,12 @@ await TaskEx.Run(() =>
|
|||
screenRecorder.SaveAsGIF(path, TaskSettings.ImageSettings.ImageGIFQuality);
|
||||
break;
|
||||
case ScreenRecordOutput.AVICommandLine:
|
||||
path = Path.Combine(TaskSettings.CaptureFolder, TaskHelpers.GetFilename(TaskSettings,
|
||||
TaskSettings.CaptureSettings.ScreenRecordCommandLineOutputExtension));
|
||||
screenRecorder.EncodeUsingCommandLine(path, TaskSettings.CaptureSettings.ScreenRecordCommandLinePath,
|
||||
TaskSettings.CaptureSettings.ScreenRecordCommandLineArgs);
|
||||
if (Program.Settings.VideoEncoders.Count > 0)
|
||||
{
|
||||
VideoEncoder encoder = Program.Settings.VideoEncoders[Program.Settings.VideoEncoderId.BetweenOrDefault(0, Program.Settings.VideoEncoders.Count - 1)];
|
||||
path = Path.Combine(TaskSettings.CaptureFolder, TaskHelpers.GetFilename(TaskSettings, encoder.OutputExtension));
|
||||
screenRecorder.EncodeUsingCommandLine(encoder, path);
|
||||
}
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
|
444
ShareX/Forms/TaskSettingsForm.Designer.cs
generated
444
ShareX/Forms/TaskSettingsForm.Designer.cs
generated
|
@ -100,6 +100,16 @@ private void InitializeComponent()
|
|||
this.tpCaptureShape = new System.Windows.Forms.TabPage();
|
||||
this.pgShapesCapture = new System.Windows.Forms.PropertyGrid();
|
||||
this.chkUseDefaultCaptureSettings = new System.Windows.Forms.CheckBox();
|
||||
this.tpScreenRecorder = new System.Windows.Forms.TabPage();
|
||||
this.cboEncoder = new System.Windows.Forms.ComboBox();
|
||||
this.nudScreenRecorderDuration = new System.Windows.Forms.NumericUpDown();
|
||||
this.lblScreenRecorderStartDelay = new System.Windows.Forms.Label();
|
||||
this.nudScreenRecorderStartDelay = new System.Windows.Forms.NumericUpDown();
|
||||
this.cbScreenRecorderOutput = new System.Windows.Forms.ComboBox();
|
||||
this.lblScreenRecorderOutput = new System.Windows.Forms.Label();
|
||||
this.cbScreenRecorderFixedDuration = new System.Windows.Forms.CheckBox();
|
||||
this.nudScreenRecorderFPS = new System.Windows.Forms.NumericUpDown();
|
||||
this.lblScreenRecorderFPS = new System.Windows.Forms.Label();
|
||||
this.tpActions = new System.Windows.Forms.TabPage();
|
||||
this.pActions = new System.Windows.Forms.Panel();
|
||||
this.btnActionsAdd = new System.Windows.Forms.Button();
|
||||
|
@ -138,23 +148,6 @@ private void InitializeComponent()
|
|||
this.tpAdvanced = new System.Windows.Forms.TabPage();
|
||||
this.pgTaskSettings = new System.Windows.Forms.PropertyGrid();
|
||||
this.chkUseDefaultAdvancedSettings = new System.Windows.Forms.CheckBox();
|
||||
this.tpScreenRecorder = new System.Windows.Forms.TabPage();
|
||||
this.nudScreenRecorderDuration = new System.Windows.Forms.NumericUpDown();
|
||||
this.lblScreenRecorderStartDelay = new System.Windows.Forms.Label();
|
||||
this.nudScreenRecorderStartDelay = new System.Windows.Forms.NumericUpDown();
|
||||
this.cbScreenRecorderOutput = new System.Windows.Forms.ComboBox();
|
||||
this.lblScreenRecorderOutput = new System.Windows.Forms.Label();
|
||||
this.cbScreenRecorderFixedDuration = new System.Windows.Forms.CheckBox();
|
||||
this.nudScreenRecorderFPS = new System.Windows.Forms.NumericUpDown();
|
||||
this.lblScreenRecorderFPS = new System.Windows.Forms.Label();
|
||||
this.gbCommandLineEncoderSettings = new System.Windows.Forms.GroupBox();
|
||||
this.btnScreenRecorderBrowseCommandLinePath = new System.Windows.Forms.Button();
|
||||
this.lblScreenRecorderCommandLineOutputExtension = new System.Windows.Forms.Label();
|
||||
this.lblScreenRecorderCommandLineArgs = new System.Windows.Forms.Label();
|
||||
this.lblScreenRecorderCommandLinePath = new System.Windows.Forms.Label();
|
||||
this.txtScreenRecorderCommandLineArgs = new System.Windows.Forms.TextBox();
|
||||
this.txtScreenRecorderCommandLineOutputExtension = new System.Windows.Forms.TextBox();
|
||||
this.txtScreenRecorderCommandLinePath = new System.Windows.Forms.TextBox();
|
||||
this.tcHotkeySettings.SuspendLayout();
|
||||
this.tpTask.SuspendLayout();
|
||||
this.cmsDestinations.SuspendLayout();
|
||||
|
@ -173,6 +166,10 @@ private void InitializeComponent()
|
|||
((System.ComponentModel.ISupportInitialize)(this.nudScreenshotDelay)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudCaptureShadowOffset)).BeginInit();
|
||||
this.tpCaptureShape.SuspendLayout();
|
||||
this.tpScreenRecorder.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudScreenRecorderDuration)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudScreenRecorderStartDelay)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudScreenRecorderFPS)).BeginInit();
|
||||
this.tpActions.SuspendLayout();
|
||||
this.pActions.SuspendLayout();
|
||||
this.tpWatchFolders.SuspendLayout();
|
||||
|
@ -182,11 +179,6 @@ private void InitializeComponent()
|
|||
this.tpUploadClipboard.SuspendLayout();
|
||||
this.tpIndexer.SuspendLayout();
|
||||
this.tpAdvanced.SuspendLayout();
|
||||
this.tpScreenRecorder.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudScreenRecorderDuration)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudScreenRecorderStartDelay)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudScreenRecorderFPS)).BeginInit();
|
||||
this.gbCommandLineEncoderSettings.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// cmsAfterCapture
|
||||
|
@ -743,7 +735,7 @@ private void InitializeComponent()
|
|||
this.tpEffects.Location = new System.Drawing.Point(4, 22);
|
||||
this.tpEffects.Name = "tpEffects";
|
||||
this.tpEffects.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tpEffects.Size = new System.Drawing.Size(506, 301);
|
||||
this.tpEffects.Size = new System.Drawing.Size(536, 301);
|
||||
this.tpEffects.TabIndex = 2;
|
||||
this.tpEffects.Text = "Effects";
|
||||
this.tpEffects.UseVisualStyleBackColor = true;
|
||||
|
@ -979,7 +971,7 @@ private void InitializeComponent()
|
|||
this.tpCaptureShape.Location = new System.Drawing.Point(4, 22);
|
||||
this.tpCaptureShape.Name = "tpCaptureShape";
|
||||
this.tpCaptureShape.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tpCaptureShape.Size = new System.Drawing.Size(506, 301);
|
||||
this.tpCaptureShape.Size = new System.Drawing.Size(536, 301);
|
||||
this.tpCaptureShape.TabIndex = 1;
|
||||
this.tpCaptureShape.Text = "Shape capture";
|
||||
this.tpCaptureShape.UseVisualStyleBackColor = true;
|
||||
|
@ -990,7 +982,7 @@ private void InitializeComponent()
|
|||
this.pgShapesCapture.Location = new System.Drawing.Point(3, 3);
|
||||
this.pgShapesCapture.Name = "pgShapesCapture";
|
||||
this.pgShapesCapture.PropertySort = System.Windows.Forms.PropertySort.NoSort;
|
||||
this.pgShapesCapture.Size = new System.Drawing.Size(500, 295);
|
||||
this.pgShapesCapture.Size = new System.Drawing.Size(530, 295);
|
||||
this.pgShapesCapture.TabIndex = 11;
|
||||
this.pgShapesCapture.ToolbarVisible = false;
|
||||
//
|
||||
|
@ -1009,6 +1001,162 @@ private void InitializeComponent()
|
|||
this.chkUseDefaultCaptureSettings.UseVisualStyleBackColor = true;
|
||||
this.chkUseDefaultCaptureSettings.CheckedChanged += new System.EventHandler(this.chkUseDefaultCaptureSettings_CheckedChanged);
|
||||
//
|
||||
// tpScreenRecorder
|
||||
//
|
||||
this.tpScreenRecorder.Controls.Add(this.cboEncoder);
|
||||
this.tpScreenRecorder.Controls.Add(this.nudScreenRecorderDuration);
|
||||
this.tpScreenRecorder.Controls.Add(this.lblScreenRecorderStartDelay);
|
||||
this.tpScreenRecorder.Controls.Add(this.nudScreenRecorderStartDelay);
|
||||
this.tpScreenRecorder.Controls.Add(this.cbScreenRecorderOutput);
|
||||
this.tpScreenRecorder.Controls.Add(this.lblScreenRecorderOutput);
|
||||
this.tpScreenRecorder.Controls.Add(this.cbScreenRecorderFixedDuration);
|
||||
this.tpScreenRecorder.Controls.Add(this.nudScreenRecorderFPS);
|
||||
this.tpScreenRecorder.Controls.Add(this.lblScreenRecorderFPS);
|
||||
this.tpScreenRecorder.Location = new System.Drawing.Point(4, 22);
|
||||
this.tpScreenRecorder.Name = "tpScreenRecorder";
|
||||
this.tpScreenRecorder.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tpScreenRecorder.Size = new System.Drawing.Size(550, 360);
|
||||
this.tpScreenRecorder.TabIndex = 2;
|
||||
this.tpScreenRecorder.Text = "Screen recorder";
|
||||
this.tpScreenRecorder.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cboEncoder
|
||||
//
|
||||
this.cboEncoder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboEncoder.FormattingEnabled = true;
|
||||
this.cboEncoder.Location = new System.Drawing.Point(200, 12);
|
||||
this.cboEncoder.Name = "cboEncoder";
|
||||
this.cboEncoder.Size = new System.Drawing.Size(336, 21);
|
||||
this.cboEncoder.TabIndex = 10;
|
||||
this.cboEncoder.SelectedIndexChanged += new System.EventHandler(this.cboEncoder_SelectedIndexChanged);
|
||||
//
|
||||
// nudScreenRecorderDuration
|
||||
//
|
||||
this.nudScreenRecorderDuration.DecimalPlaces = 1;
|
||||
this.nudScreenRecorderDuration.Increment = new decimal(new int[] {
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.nudScreenRecorderDuration.Location = new System.Drawing.Point(163, 70);
|
||||
this.nudScreenRecorderDuration.Maximum = new decimal(new int[] {
|
||||
60,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudScreenRecorderDuration.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudScreenRecorderDuration.Name = "nudScreenRecorderDuration";
|
||||
this.nudScreenRecorderDuration.Size = new System.Drawing.Size(56, 20);
|
||||
this.nudScreenRecorderDuration.TabIndex = 6;
|
||||
this.nudScreenRecorderDuration.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.nudScreenRecorderDuration.Value = new decimal(new int[] {
|
||||
3,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudScreenRecorderDuration.ValueChanged += new System.EventHandler(this.nudScreenRecorderDuration_ValueChanged);
|
||||
//
|
||||
// lblScreenRecorderStartDelay
|
||||
//
|
||||
this.lblScreenRecorderStartDelay.AutoSize = true;
|
||||
this.lblScreenRecorderStartDelay.Location = new System.Drawing.Point(16, 104);
|
||||
this.lblScreenRecorderStartDelay.Name = "lblScreenRecorderStartDelay";
|
||||
this.lblScreenRecorderStartDelay.Size = new System.Drawing.Size(60, 13);
|
||||
this.lblScreenRecorderStartDelay.TabIndex = 9;
|
||||
this.lblScreenRecorderStartDelay.Text = "Start delay:";
|
||||
//
|
||||
// nudScreenRecorderStartDelay
|
||||
//
|
||||
this.nudScreenRecorderStartDelay.DecimalPlaces = 1;
|
||||
this.nudScreenRecorderStartDelay.Increment = new decimal(new int[] {
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.nudScreenRecorderStartDelay.Location = new System.Drawing.Point(80, 100);
|
||||
this.nudScreenRecorderStartDelay.Maximum = new decimal(new int[] {
|
||||
60,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudScreenRecorderStartDelay.Name = "nudScreenRecorderStartDelay";
|
||||
this.nudScreenRecorderStartDelay.Size = new System.Drawing.Size(56, 20);
|
||||
this.nudScreenRecorderStartDelay.TabIndex = 8;
|
||||
this.nudScreenRecorderStartDelay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.nudScreenRecorderStartDelay.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudScreenRecorderStartDelay.ValueChanged += new System.EventHandler(this.nudScreenRecorderStartDelay_ValueChanged);
|
||||
//
|
||||
// cbScreenRecorderOutput
|
||||
//
|
||||
this.cbScreenRecorderOutput.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbScreenRecorderOutput.FormattingEnabled = true;
|
||||
this.cbScreenRecorderOutput.Location = new System.Drawing.Point(64, 12);
|
||||
this.cbScreenRecorderOutput.Name = "cbScreenRecorderOutput";
|
||||
this.cbScreenRecorderOutput.Size = new System.Drawing.Size(126, 21);
|
||||
this.cbScreenRecorderOutput.TabIndex = 1;
|
||||
this.cbScreenRecorderOutput.SelectedIndexChanged += new System.EventHandler(this.cbScreenRecorderOutput_SelectedIndexChanged);
|
||||
//
|
||||
// lblScreenRecorderOutput
|
||||
//
|
||||
this.lblScreenRecorderOutput.AutoSize = true;
|
||||
this.lblScreenRecorderOutput.Location = new System.Drawing.Point(16, 16);
|
||||
this.lblScreenRecorderOutput.Name = "lblScreenRecorderOutput";
|
||||
this.lblScreenRecorderOutput.Size = new System.Drawing.Size(42, 13);
|
||||
this.lblScreenRecorderOutput.TabIndex = 0;
|
||||
this.lblScreenRecorderOutput.Text = "Output:";
|
||||
//
|
||||
// cbScreenRecorderFixedDuration
|
||||
//
|
||||
this.cbScreenRecorderFixedDuration.AutoSize = true;
|
||||
this.cbScreenRecorderFixedDuration.Location = new System.Drawing.Point(19, 72);
|
||||
this.cbScreenRecorderFixedDuration.Name = "cbScreenRecorderFixedDuration";
|
||||
this.cbScreenRecorderFixedDuration.Size = new System.Drawing.Size(144, 17);
|
||||
this.cbScreenRecorderFixedDuration.TabIndex = 4;
|
||||
this.cbScreenRecorderFixedDuration.Text = "Fixed duration (seconds):";
|
||||
this.cbScreenRecorderFixedDuration.UseVisualStyleBackColor = true;
|
||||
this.cbScreenRecorderFixedDuration.CheckedChanged += new System.EventHandler(this.cbScreenRecorderFixedDuration_CheckedChanged);
|
||||
//
|
||||
// nudScreenRecorderFPS
|
||||
//
|
||||
this.nudScreenRecorderFPS.Location = new System.Drawing.Point(48, 44);
|
||||
this.nudScreenRecorderFPS.Maximum = new decimal(new int[] {
|
||||
30,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudScreenRecorderFPS.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudScreenRecorderFPS.Name = "nudScreenRecorderFPS";
|
||||
this.nudScreenRecorderFPS.Size = new System.Drawing.Size(64, 20);
|
||||
this.nudScreenRecorderFPS.TabIndex = 3;
|
||||
this.nudScreenRecorderFPS.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.nudScreenRecorderFPS.Value = new decimal(new int[] {
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudScreenRecorderFPS.ValueChanged += new System.EventHandler(this.nudScreenRecorderFPS_ValueChanged);
|
||||
//
|
||||
// lblScreenRecorderFPS
|
||||
//
|
||||
this.lblScreenRecorderFPS.AutoSize = true;
|
||||
this.lblScreenRecorderFPS.Location = new System.Drawing.Point(16, 48);
|
||||
this.lblScreenRecorderFPS.Name = "lblScreenRecorderFPS";
|
||||
this.lblScreenRecorderFPS.Size = new System.Drawing.Size(30, 13);
|
||||
this.lblScreenRecorderFPS.TabIndex = 2;
|
||||
this.lblScreenRecorderFPS.Text = "FPS:";
|
||||
//
|
||||
// tpActions
|
||||
//
|
||||
this.tpActions.Controls.Add(this.pActions);
|
||||
|
@ -1305,7 +1453,7 @@ private void InitializeComponent()
|
|||
this.tpUploadClipboard.Location = new System.Drawing.Point(4, 22);
|
||||
this.tpUploadClipboard.Name = "tpUploadClipboard";
|
||||
this.tpUploadClipboard.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tpUploadClipboard.Size = new System.Drawing.Size(506, 301);
|
||||
this.tpUploadClipboard.Size = new System.Drawing.Size(536, 301);
|
||||
this.tpUploadClipboard.TabIndex = 1;
|
||||
this.tpUploadClipboard.Text = "Clipboard upload";
|
||||
this.tpUploadClipboard.UseVisualStyleBackColor = true;
|
||||
|
@ -1410,229 +1558,6 @@ private void InitializeComponent()
|
|||
this.chkUseDefaultAdvancedSettings.UseVisualStyleBackColor = true;
|
||||
this.chkUseDefaultAdvancedSettings.CheckedChanged += new System.EventHandler(this.chkUseDefaultAdvancedSettings_CheckedChanged);
|
||||
//
|
||||
// tpScreenRecorder
|
||||
//
|
||||
this.tpScreenRecorder.Controls.Add(this.nudScreenRecorderDuration);
|
||||
this.tpScreenRecorder.Controls.Add(this.lblScreenRecorderStartDelay);
|
||||
this.tpScreenRecorder.Controls.Add(this.nudScreenRecorderStartDelay);
|
||||
this.tpScreenRecorder.Controls.Add(this.cbScreenRecorderOutput);
|
||||
this.tpScreenRecorder.Controls.Add(this.lblScreenRecorderOutput);
|
||||
this.tpScreenRecorder.Controls.Add(this.cbScreenRecorderFixedDuration);
|
||||
this.tpScreenRecorder.Controls.Add(this.nudScreenRecorderFPS);
|
||||
this.tpScreenRecorder.Controls.Add(this.lblScreenRecorderFPS);
|
||||
this.tpScreenRecorder.Controls.Add(this.gbCommandLineEncoderSettings);
|
||||
this.tpScreenRecorder.Location = new System.Drawing.Point(4, 22);
|
||||
this.tpScreenRecorder.Name = "tpScreenRecorder";
|
||||
this.tpScreenRecorder.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tpScreenRecorder.Size = new System.Drawing.Size(550, 360);
|
||||
this.tpScreenRecorder.TabIndex = 2;
|
||||
this.tpScreenRecorder.Text = "Screen recorder";
|
||||
this.tpScreenRecorder.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// nudScreenRecorderDuration
|
||||
//
|
||||
this.nudScreenRecorderDuration.DecimalPlaces = 1;
|
||||
this.nudScreenRecorderDuration.Increment = new decimal(new int[] {
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.nudScreenRecorderDuration.Location = new System.Drawing.Point(163, 70);
|
||||
this.nudScreenRecorderDuration.Maximum = new decimal(new int[] {
|
||||
60,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudScreenRecorderDuration.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudScreenRecorderDuration.Name = "nudScreenRecorderDuration";
|
||||
this.nudScreenRecorderDuration.Size = new System.Drawing.Size(56, 20);
|
||||
this.nudScreenRecorderDuration.TabIndex = 6;
|
||||
this.nudScreenRecorderDuration.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.nudScreenRecorderDuration.Value = new decimal(new int[] {
|
||||
3,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudScreenRecorderDuration.ValueChanged += new System.EventHandler(this.nudScreenRecorderDuration_ValueChanged);
|
||||
//
|
||||
// lblScreenRecorderStartDelay
|
||||
//
|
||||
this.lblScreenRecorderStartDelay.AutoSize = true;
|
||||
this.lblScreenRecorderStartDelay.Location = new System.Drawing.Point(16, 104);
|
||||
this.lblScreenRecorderStartDelay.Name = "lblScreenRecorderStartDelay";
|
||||
this.lblScreenRecorderStartDelay.Size = new System.Drawing.Size(60, 13);
|
||||
this.lblScreenRecorderStartDelay.TabIndex = 9;
|
||||
this.lblScreenRecorderStartDelay.Text = "Start delay:";
|
||||
//
|
||||
// nudScreenRecorderStartDelay
|
||||
//
|
||||
this.nudScreenRecorderStartDelay.DecimalPlaces = 1;
|
||||
this.nudScreenRecorderStartDelay.Increment = new decimal(new int[] {
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.nudScreenRecorderStartDelay.Location = new System.Drawing.Point(80, 100);
|
||||
this.nudScreenRecorderStartDelay.Maximum = new decimal(new int[] {
|
||||
60,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudScreenRecorderStartDelay.Name = "nudScreenRecorderStartDelay";
|
||||
this.nudScreenRecorderStartDelay.Size = new System.Drawing.Size(56, 20);
|
||||
this.nudScreenRecorderStartDelay.TabIndex = 8;
|
||||
this.nudScreenRecorderStartDelay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.nudScreenRecorderStartDelay.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudScreenRecorderStartDelay.ValueChanged += new System.EventHandler(this.nudScreenRecorderStartDelay_ValueChanged);
|
||||
//
|
||||
// cbScreenRecorderOutput
|
||||
//
|
||||
this.cbScreenRecorderOutput.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbScreenRecorderOutput.FormattingEnabled = true;
|
||||
this.cbScreenRecorderOutput.Location = new System.Drawing.Point(64, 12);
|
||||
this.cbScreenRecorderOutput.Name = "cbScreenRecorderOutput";
|
||||
this.cbScreenRecorderOutput.Size = new System.Drawing.Size(126, 21);
|
||||
this.cbScreenRecorderOutput.TabIndex = 1;
|
||||
this.cbScreenRecorderOutput.SelectedIndexChanged += new System.EventHandler(this.cbScreenRecorderOutput_SelectedIndexChanged);
|
||||
//
|
||||
// lblScreenRecorderOutput
|
||||
//
|
||||
this.lblScreenRecorderOutput.AutoSize = true;
|
||||
this.lblScreenRecorderOutput.Location = new System.Drawing.Point(16, 16);
|
||||
this.lblScreenRecorderOutput.Name = "lblScreenRecorderOutput";
|
||||
this.lblScreenRecorderOutput.Size = new System.Drawing.Size(42, 13);
|
||||
this.lblScreenRecorderOutput.TabIndex = 0;
|
||||
this.lblScreenRecorderOutput.Text = "Output:";
|
||||
//
|
||||
// cbScreenRecorderFixedDuration
|
||||
//
|
||||
this.cbScreenRecorderFixedDuration.AutoSize = true;
|
||||
this.cbScreenRecorderFixedDuration.Location = new System.Drawing.Point(19, 72);
|
||||
this.cbScreenRecorderFixedDuration.Name = "cbScreenRecorderFixedDuration";
|
||||
this.cbScreenRecorderFixedDuration.Size = new System.Drawing.Size(144, 17);
|
||||
this.cbScreenRecorderFixedDuration.TabIndex = 4;
|
||||
this.cbScreenRecorderFixedDuration.Text = "Fixed duration (seconds):";
|
||||
this.cbScreenRecorderFixedDuration.UseVisualStyleBackColor = true;
|
||||
this.cbScreenRecorderFixedDuration.CheckedChanged += new System.EventHandler(this.cbScreenRecorderFixedDuration_CheckedChanged);
|
||||
//
|
||||
// nudScreenRecorderFPS
|
||||
//
|
||||
this.nudScreenRecorderFPS.Location = new System.Drawing.Point(48, 44);
|
||||
this.nudScreenRecorderFPS.Maximum = new decimal(new int[] {
|
||||
30,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudScreenRecorderFPS.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudScreenRecorderFPS.Name = "nudScreenRecorderFPS";
|
||||
this.nudScreenRecorderFPS.Size = new System.Drawing.Size(64, 20);
|
||||
this.nudScreenRecorderFPS.TabIndex = 3;
|
||||
this.nudScreenRecorderFPS.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.nudScreenRecorderFPS.Value = new decimal(new int[] {
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudScreenRecorderFPS.ValueChanged += new System.EventHandler(this.nudScreenRecorderFPS_ValueChanged);
|
||||
//
|
||||
// lblScreenRecorderFPS
|
||||
//
|
||||
this.lblScreenRecorderFPS.AutoSize = true;
|
||||
this.lblScreenRecorderFPS.Location = new System.Drawing.Point(16, 48);
|
||||
this.lblScreenRecorderFPS.Name = "lblScreenRecorderFPS";
|
||||
this.lblScreenRecorderFPS.Size = new System.Drawing.Size(30, 13);
|
||||
this.lblScreenRecorderFPS.TabIndex = 2;
|
||||
this.lblScreenRecorderFPS.Text = "FPS:";
|
||||
//
|
||||
// gbCommandLineEncoderSettings
|
||||
//
|
||||
this.gbCommandLineEncoderSettings.Controls.Add(this.btnScreenRecorderBrowseCommandLinePath);
|
||||
this.gbCommandLineEncoderSettings.Controls.Add(this.lblScreenRecorderCommandLineOutputExtension);
|
||||
this.gbCommandLineEncoderSettings.Controls.Add(this.lblScreenRecorderCommandLineArgs);
|
||||
this.gbCommandLineEncoderSettings.Controls.Add(this.lblScreenRecorderCommandLinePath);
|
||||
this.gbCommandLineEncoderSettings.Controls.Add(this.txtScreenRecorderCommandLineArgs);
|
||||
this.gbCommandLineEncoderSettings.Controls.Add(this.txtScreenRecorderCommandLineOutputExtension);
|
||||
this.gbCommandLineEncoderSettings.Controls.Add(this.txtScreenRecorderCommandLinePath);
|
||||
this.gbCommandLineEncoderSettings.Location = new System.Drawing.Point(16, 136);
|
||||
this.gbCommandLineEncoderSettings.Name = "gbCommandLineEncoderSettings";
|
||||
this.gbCommandLineEncoderSettings.Size = new System.Drawing.Size(472, 120);
|
||||
this.gbCommandLineEncoderSettings.TabIndex = 7;
|
||||
this.gbCommandLineEncoderSettings.TabStop = false;
|
||||
this.gbCommandLineEncoderSettings.Text = "Command line encoder settings";
|
||||
//
|
||||
// btnScreenRecorderBrowseCommandLinePath
|
||||
//
|
||||
this.btnScreenRecorderBrowseCommandLinePath.Location = new System.Drawing.Point(424, 18);
|
||||
this.btnScreenRecorderBrowseCommandLinePath.Name = "btnScreenRecorderBrowseCommandLinePath";
|
||||
this.btnScreenRecorderBrowseCommandLinePath.Size = new System.Drawing.Size(32, 24);
|
||||
this.btnScreenRecorderBrowseCommandLinePath.TabIndex = 2;
|
||||
this.btnScreenRecorderBrowseCommandLinePath.Text = "...";
|
||||
this.btnScreenRecorderBrowseCommandLinePath.UseVisualStyleBackColor = true;
|
||||
this.btnScreenRecorderBrowseCommandLinePath.Click += new System.EventHandler(this.btnScreenRecorderBrowseCommandLinePath_Click);
|
||||
//
|
||||
// lblScreenRecorderCommandLineOutputExtension
|
||||
//
|
||||
this.lblScreenRecorderCommandLineOutputExtension.AutoSize = true;
|
||||
this.lblScreenRecorderCommandLineOutputExtension.Location = new System.Drawing.Point(16, 88);
|
||||
this.lblScreenRecorderCommandLineOutputExtension.Name = "lblScreenRecorderCommandLineOutputExtension";
|
||||
this.lblScreenRecorderCommandLineOutputExtension.Size = new System.Drawing.Size(90, 13);
|
||||
this.lblScreenRecorderCommandLineOutputExtension.TabIndex = 5;
|
||||
this.lblScreenRecorderCommandLineOutputExtension.Text = "Output extension:";
|
||||
//
|
||||
// lblScreenRecorderCommandLineArgs
|
||||
//
|
||||
this.lblScreenRecorderCommandLineArgs.AutoSize = true;
|
||||
this.lblScreenRecorderCommandLineArgs.Location = new System.Drawing.Point(16, 56);
|
||||
this.lblScreenRecorderCommandLineArgs.Name = "lblScreenRecorderCommandLineArgs";
|
||||
this.lblScreenRecorderCommandLineArgs.Size = new System.Drawing.Size(60, 13);
|
||||
this.lblScreenRecorderCommandLineArgs.TabIndex = 3;
|
||||
this.lblScreenRecorderCommandLineArgs.Text = "Arguments:";
|
||||
//
|
||||
// lblScreenRecorderCommandLinePath
|
||||
//
|
||||
this.lblScreenRecorderCommandLinePath.AutoSize = true;
|
||||
this.lblScreenRecorderCommandLinePath.Location = new System.Drawing.Point(16, 24);
|
||||
this.lblScreenRecorderCommandLinePath.Name = "lblScreenRecorderCommandLinePath";
|
||||
this.lblScreenRecorderCommandLinePath.Size = new System.Drawing.Size(74, 13);
|
||||
this.lblScreenRecorderCommandLinePath.TabIndex = 0;
|
||||
this.lblScreenRecorderCommandLinePath.Text = "Encoder path:";
|
||||
//
|
||||
// txtScreenRecorderCommandLineArgs
|
||||
//
|
||||
this.txtScreenRecorderCommandLineArgs.Location = new System.Drawing.Point(117, 52);
|
||||
this.txtScreenRecorderCommandLineArgs.Name = "txtScreenRecorderCommandLineArgs";
|
||||
this.txtScreenRecorderCommandLineArgs.Size = new System.Drawing.Size(339, 20);
|
||||
this.txtScreenRecorderCommandLineArgs.TabIndex = 4;
|
||||
this.txtScreenRecorderCommandLineArgs.TextChanged += new System.EventHandler(this.txtScreenRecorderCommandLineArgs_TextChanged);
|
||||
//
|
||||
// txtScreenRecorderCommandLineOutputExtension
|
||||
//
|
||||
this.txtScreenRecorderCommandLineOutputExtension.Location = new System.Drawing.Point(117, 84);
|
||||
this.txtScreenRecorderCommandLineOutputExtension.Name = "txtScreenRecorderCommandLineOutputExtension";
|
||||
this.txtScreenRecorderCommandLineOutputExtension.Size = new System.Drawing.Size(339, 20);
|
||||
this.txtScreenRecorderCommandLineOutputExtension.TabIndex = 6;
|
||||
this.txtScreenRecorderCommandLineOutputExtension.TextChanged += new System.EventHandler(this.txtScreenRecorderCommandLineOutputExtension_TextChanged);
|
||||
//
|
||||
// txtScreenRecorderCommandLinePath
|
||||
//
|
||||
this.txtScreenRecorderCommandLinePath.Location = new System.Drawing.Point(117, 20);
|
||||
this.txtScreenRecorderCommandLinePath.Name = "txtScreenRecorderCommandLinePath";
|
||||
this.txtScreenRecorderCommandLinePath.Size = new System.Drawing.Size(299, 20);
|
||||
this.txtScreenRecorderCommandLinePath.TabIndex = 1;
|
||||
this.txtScreenRecorderCommandLinePath.TextChanged += new System.EventHandler(this.txtScreenRecorderCommandLinePath_TextChanged);
|
||||
//
|
||||
// TaskSettingsForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -1674,6 +1599,11 @@ private void InitializeComponent()
|
|||
((System.ComponentModel.ISupportInitialize)(this.nudScreenshotDelay)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudCaptureShadowOffset)).EndInit();
|
||||
this.tpCaptureShape.ResumeLayout(false);
|
||||
this.tpScreenRecorder.ResumeLayout(false);
|
||||
this.tpScreenRecorder.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudScreenRecorderDuration)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudScreenRecorderStartDelay)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudScreenRecorderFPS)).EndInit();
|
||||
this.tpActions.ResumeLayout(false);
|
||||
this.tpActions.PerformLayout();
|
||||
this.pActions.ResumeLayout(false);
|
||||
|
@ -1690,13 +1620,6 @@ private void InitializeComponent()
|
|||
this.tpIndexer.PerformLayout();
|
||||
this.tpAdvanced.ResumeLayout(false);
|
||||
this.tpAdvanced.PerformLayout();
|
||||
this.tpScreenRecorder.ResumeLayout(false);
|
||||
this.tpScreenRecorder.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudScreenRecorderDuration)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudScreenRecorderStartDelay)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudScreenRecorderFPS)).EndInit();
|
||||
this.gbCommandLineEncoderSettings.ResumeLayout(false);
|
||||
this.gbCommandLineEncoderSettings.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
@ -1777,14 +1700,6 @@ private void InitializeComponent()
|
|||
private System.Windows.Forms.CheckBox chkUseDefaultUploadSettings;
|
||||
private System.Windows.Forms.Panel pActions;
|
||||
private System.Windows.Forms.CheckBox chkUseDefaultAdvancedSettings;
|
||||
private System.Windows.Forms.Button btnScreenRecorderBrowseCommandLinePath;
|
||||
private System.Windows.Forms.Label lblScreenRecorderCommandLineOutputExtension;
|
||||
private System.Windows.Forms.Label lblScreenRecorderCommandLineArgs;
|
||||
private System.Windows.Forms.Label lblScreenRecorderCommandLinePath;
|
||||
private System.Windows.Forms.TextBox txtScreenRecorderCommandLineArgs;
|
||||
private System.Windows.Forms.TextBox txtScreenRecorderCommandLineOutputExtension;
|
||||
private System.Windows.Forms.TextBox txtScreenRecorderCommandLinePath;
|
||||
private System.Windows.Forms.GroupBox gbCommandLineEncoderSettings;
|
||||
private System.Windows.Forms.CheckBox cbScreenRecorderFixedDuration;
|
||||
private System.Windows.Forms.NumericUpDown nudScreenRecorderFPS;
|
||||
private System.Windows.Forms.NumericUpDown nudScreenRecorderDuration;
|
||||
|
@ -1829,6 +1744,7 @@ private void InitializeComponent()
|
|||
private System.Windows.Forms.ToolStripMenuItem tsmiSocialServices;
|
||||
private System.Windows.Forms.ComboBox cbImageFileExist;
|
||||
private System.Windows.Forms.Label lblImageFileExist;
|
||||
private System.Windows.Forms.ComboBox cboEncoder;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -43,6 +43,8 @@ public partial class TaskSettingsForm : Form
|
|||
private ToolStripDropDownItem tsmiImageFileUploaders, tsmiTextFileUploaders;
|
||||
private bool loaded;
|
||||
|
||||
private readonly string ConfigureEncoder = "<--- Configure video encoders --->";
|
||||
|
||||
public TaskSettingsForm(TaskSettings hotkeySetting, bool isDefault = false)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
@ -151,24 +153,17 @@ public TaskSettingsForm(TaskSettings hotkeySetting, bool isDefault = false)
|
|||
// Capture / Screen recorder
|
||||
cbScreenRecorderOutput.Items.AddRange(Helpers.GetEnumDescriptions<ScreenRecordOutput>());
|
||||
cbScreenRecorderOutput.SelectedIndex = (int)TaskSettings.CaptureSettings.ScreenRecordOutput;
|
||||
UpdateVideoEncoders();
|
||||
|
||||
nudScreenRecorderFPS.Value = TaskSettings.CaptureSettings.ScreenRecordFPS;
|
||||
cbScreenRecorderFixedDuration.Checked = TaskSettings.CaptureSettings.ScreenRecordFixedDuration;
|
||||
nudScreenRecorderDuration.Enabled = TaskSettings.CaptureSettings.ScreenRecordFixedDuration;
|
||||
nudScreenRecorderDuration.Value = (decimal)TaskSettings.CaptureSettings.ScreenRecordDuration;
|
||||
nudScreenRecorderStartDelay.Value = (decimal)TaskSettings.CaptureSettings.ScreenRecordStartDelay;
|
||||
|
||||
gbCommandLineEncoderSettings.Enabled = TaskSettings.CaptureSettings.ScreenRecordOutput == ScreenRecordOutput.AVICommandLine;
|
||||
txtScreenRecorderCommandLinePath.Text = TaskSettings.CaptureSettings.ScreenRecordCommandLinePath;
|
||||
txtScreenRecorderCommandLineArgs.Text = TaskSettings.CaptureSettings.ScreenRecordCommandLineArgs;
|
||||
txtScreenRecorderCommandLineOutputExtension.Text = TaskSettings.CaptureSettings.ScreenRecordCommandLineOutputExtension;
|
||||
|
||||
// Actions
|
||||
TaskHelpers.AddDefaultExternalPrograms(TaskSettings);
|
||||
|
||||
foreach (ExternalProgram fileAction in TaskSettings.ExternalPrograms)
|
||||
{
|
||||
AddFileAction(fileAction);
|
||||
}
|
||||
TaskSettings.ExternalPrograms.ForEach(x => AddFileAction(x));
|
||||
|
||||
// Watch folders
|
||||
cbWatchFolderEnabled.Checked = TaskSettings.WatchFolderEnabled;
|
||||
|
@ -205,6 +200,17 @@ public TaskSettingsForm(TaskSettings hotkeySetting, bool isDefault = false)
|
|||
loaded = true;
|
||||
}
|
||||
|
||||
private void UpdateVideoEncoders()
|
||||
{
|
||||
if (Program.Settings.VideoEncoders.Count > 0)
|
||||
{
|
||||
cboEncoder.Items.Clear();
|
||||
Program.Settings.VideoEncoders.ForEach(x => cboEncoder.Items.Add(x));
|
||||
cboEncoder.Items.Add(ConfigureEncoder);
|
||||
cboEncoder.SelectedIndex = Program.Settings.VideoEncoderId.BetweenOrDefault(0, Program.Settings.VideoEncoders.Count - 1);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateDefaultSettingVisibility()
|
||||
{
|
||||
if (!IsDefault)
|
||||
|
@ -599,12 +605,31 @@ private void cbCaptureTransparent_CheckedChanged(object sender, EventArgs e)
|
|||
cbCaptureShadow.Enabled = TaskSettings.CaptureSettings.CaptureTransparent;
|
||||
}
|
||||
|
||||
#endregion Capture
|
||||
|
||||
#region Screen recorder
|
||||
|
||||
private void cbScreenRecorderOutput_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
TaskSettings.CaptureSettings.ScreenRecordOutput = (ScreenRecordOutput)cbScreenRecorderOutput.SelectedIndex;
|
||||
gbCommandLineEncoderSettings.Enabled = TaskSettings.CaptureSettings.ScreenRecordOutput == ScreenRecordOutput.AVICommandLine;
|
||||
cboEncoder.Enabled = TaskSettings.CaptureSettings.ScreenRecordOutput == ScreenRecordOutput.AVICommandLine;
|
||||
}
|
||||
|
||||
private void cboEncoder_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (cboEncoder.SelectedIndex == cboEncoder.Items.Count - 1)
|
||||
{
|
||||
using (ApplicationSettingsForm form = new ApplicationSettingsForm())
|
||||
{
|
||||
form.SelectProfilesTab();
|
||||
form.ShowDialog();
|
||||
UpdateVideoEncoders();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Program.Settings.VideoEncoderId = cboEncoder.SelectedIndex;
|
||||
}
|
||||
}
|
||||
|
||||
private void nudScreenRecorderFPS_ValueChanged(object sender, EventArgs e)
|
||||
|
@ -628,30 +653,8 @@ private void nudScreenRecorderStartDelay_ValueChanged(object sender, EventArgs e
|
|||
TaskSettings.CaptureSettings.ScreenRecordStartDelay = (float)nudScreenRecorderStartDelay.Value;
|
||||
}
|
||||
|
||||
private void txtScreenRecorderCommandLinePath_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
TaskSettings.CaptureSettings.ScreenRecordCommandLinePath = txtScreenRecorderCommandLinePath.Text;
|
||||
}
|
||||
|
||||
private void btnScreenRecorderBrowseCommandLinePath_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.BrowseFile("ShareX - Choose encoder path", txtScreenRecorderCommandLinePath, Program.StartupPath);
|
||||
}
|
||||
|
||||
private void txtScreenRecorderCommandLineArgs_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
TaskSettings.CaptureSettings.ScreenRecordCommandLineArgs = txtScreenRecorderCommandLineArgs.Text;
|
||||
}
|
||||
|
||||
private void txtScreenRecorderCommandLineOutputExtension_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
TaskSettings.CaptureSettings.ScreenRecordCommandLineOutputExtension = txtScreenRecorderCommandLineOutputExtension.Text;
|
||||
}
|
||||
|
||||
#endregion Screen recorder
|
||||
|
||||
#endregion Capture
|
||||
|
||||
#region Actions
|
||||
|
||||
private void chkUseDefaultActions_CheckedChanged(object sender, EventArgs e)
|
||||
|
|
|
@ -94,6 +94,12 @@
|
|||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Forms\EncoderProgramForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\EncoderProgramForm.Designer.cs">
|
||||
<DependentUpon>EncoderProgramForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\AfterCaptureForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -238,6 +244,9 @@
|
|||
<EmbeddedResource Include="Forms\AutoCaptureForm.resx">
|
||||
<DependentUpon>AutoCaptureForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\EncoderProgramForm.resx">
|
||||
<DependentUpon>EncoderProgramForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\ExternalProgramForm.resx">
|
||||
<DependentUpon>ExternalProgramForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
|
@ -274,10 +274,6 @@ public class TaskSettingsCapture
|
|||
public float ScreenRecordDuration = 3f;
|
||||
public float ScreenRecordStartDelay = 0.1f;
|
||||
|
||||
public string ScreenRecordCommandLinePath = "x264.exe";
|
||||
public string ScreenRecordCommandLineArgs = "--output %output %input";
|
||||
public string ScreenRecordCommandLineOutputExtension = "mp4";
|
||||
|
||||
#endregion Capture / Screen recorder
|
||||
}
|
||||
|
||||
|
@ -303,7 +299,7 @@ public class TaskSettingsAdvanced
|
|||
[Category("General"), DefaultValue(false), Description("Allow after capture tasks for image files by treating them as images when files are handled during file upload, clipboard upload, drag & drop, watch folder and other tasks.")]
|
||||
public bool ProcessImagesDuringFileUpload { get; set; }
|
||||
|
||||
[Category("General"), DefaultValue(false), Description("Use after capture tasks for clipboard image upload.")]
|
||||
[Category("General"), DefaultValue(true), Description("Use after capture tasks for clipboard image upload.")]
|
||||
public bool ProcessImagesDuringClipboardUpload { get; set; }
|
||||
|
||||
[Category("Image"), DefaultValue(256), Description("Preferred thumbnail width. 0 means aspect ratio will be used to adjust width according to height")]
|
||||
|
|
Loading…
Reference in a new issue