Support CLI after creating Animated GIF

Support CLI after creating Animated GIF so that you can still run CLI
for GIF optimizations such as http://www.lcdf.org/gifsicle
This commit is contained in:
McoreD 2014-05-07 07:25:44 +08:00
parent 5c3042935b
commit 3f1f84f22c
4 changed files with 101 additions and 101 deletions

View file

@ -225,9 +225,9 @@ public enum ScreenRecordOutput
{
[Description("Animated GIF")]
GIF,
[Description("AVI")]
[Description("AVI via Video Compression Manager (VCM)")]
AVI,
[Description("FFmpeg")]
[Description("AVI via AForge.NET FFmpeg")]
FFmpeg,
}

View file

@ -170,7 +170,8 @@ await TaskEx.Run(() =>
path = Path.Combine(TaskSettings.CaptureFolder, TaskHelpers.GetFilename(TaskSettings, "gif"));
screenRecorder.SaveAsGIF(path, TaskSettings.ImageSettings.ImageGIFQuality);
}
else if (TaskSettings.CaptureSettings.RunScreencastCLI)
if (TaskSettings.CaptureSettings.RunScreencastCLI)
{
VideoEncoder encoder = Program.Settings.VideoEncoders[TaskSettings.CaptureSettings.VideoEncoderSelected];
path = Path.Combine(TaskSettings.CaptureFolder, TaskHelpers.GetFilename(TaskSettings, encoder.OutputExtension));

View file

@ -41,16 +41,12 @@ private void InitializeComponent()
this.tpTask = new System.Windows.Forms.TabPage();
this.chkOverrideFTP = new System.Windows.Forms.CheckBox();
this.cboFTPaccounts = new System.Windows.Forms.ComboBox();
this.btnAfterCapture = new HelpersLib.MenuButton();
this.btnAfterUpload = new HelpersLib.MenuButton();
this.btnDestinations = new HelpersLib.MenuButton();
this.cmsDestinations = new System.Windows.Forms.ContextMenuStrip(this.components);
this.tsmiImageUploaders = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiTextUploaders = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiFileUploaders = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiURLShorteners = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiSocialServices = new System.Windows.Forms.ToolStripMenuItem();
this.btnTask = new HelpersLib.MenuButton();
this.tpGeneral = new System.Windows.Forms.TabPage();
this.panelGeneral = new System.Windows.Forms.Panel();
this.lblAfterTaskNotification = new System.Windows.Forms.Label();
@ -126,10 +122,6 @@ private void InitializeComponent()
this.tpActions = new System.Windows.Forms.TabPage();
this.pActions = new System.Windows.Forms.Panel();
this.btnActionsAdd = new System.Windows.Forms.Button();
this.lvActions = new HelpersLib.MyListView();
this.chActionsName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chActionsPath = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chActionsArgs = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.btnActionsEdit = new System.Windows.Forms.Button();
this.btnActionsRemove = new System.Windows.Forms.Button();
this.chkUseDefaultActions = new System.Windows.Forms.CheckBox();
@ -162,6 +154,14 @@ 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.btnAfterCapture = new HelpersLib.MenuButton();
this.btnAfterUpload = new HelpersLib.MenuButton();
this.btnDestinations = new HelpersLib.MenuButton();
this.btnTask = new HelpersLib.MenuButton();
this.lvActions = new HelpersLib.MyListView();
this.chActionsName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chActionsPath = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chActionsArgs = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.tcHotkeySettings.SuspendLayout();
this.tpTask.SuspendLayout();
this.cmsDestinations.SuspendLayout();
@ -324,42 +324,6 @@ private void InitializeComponent()
this.cboFTPaccounts.TabIndex = 13;
this.cboFTPaccounts.SelectedIndexChanged += new System.EventHandler(this.cboFTPaccounts_SelectedIndexChanged);
//
// btnAfterCapture
//
this.btnAfterCapture.Location = new System.Drawing.Point(6, 93);
this.btnAfterCapture.Menu = this.cmsAfterCapture;
this.btnAfterCapture.Name = "btnAfterCapture";
this.btnAfterCapture.Size = new System.Drawing.Size(506, 23);
this.btnAfterCapture.TabIndex = 4;
this.btnAfterCapture.Text = "After capture...";
this.btnAfterCapture.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnAfterCapture.UseMnemonic = false;
this.btnAfterCapture.UseVisualStyleBackColor = true;
//
// btnAfterUpload
//
this.btnAfterUpload.Location = new System.Drawing.Point(6, 149);
this.btnAfterUpload.Menu = this.cmsAfterUpload;
this.btnAfterUpload.Name = "btnAfterUpload";
this.btnAfterUpload.Size = new System.Drawing.Size(506, 23);
this.btnAfterUpload.TabIndex = 6;
this.btnAfterUpload.Text = "After upload...";
this.btnAfterUpload.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnAfterUpload.UseMnemonic = false;
this.btnAfterUpload.UseVisualStyleBackColor = true;
//
// btnDestinations
//
this.btnDestinations.Location = new System.Drawing.Point(6, 205);
this.btnDestinations.Menu = this.cmsDestinations;
this.btnDestinations.Name = "btnDestinations";
this.btnDestinations.Size = new System.Drawing.Size(506, 23);
this.btnDestinations.TabIndex = 8;
this.btnDestinations.Text = "Destinations...";
this.btnDestinations.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnDestinations.UseMnemonic = false;
this.btnDestinations.UseVisualStyleBackColor = true;
//
// cmsDestinations
//
this.cmsDestinations.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -406,18 +370,6 @@ private void InitializeComponent()
this.tsmiSocialServices.Size = new System.Drawing.Size(212, 22);
this.tsmiSocialServices.Text = "Social networking services";
//
// btnTask
//
this.btnTask.Location = new System.Drawing.Point(6, 37);
this.btnTask.Menu = this.cmsTask;
this.btnTask.Name = "btnTask";
this.btnTask.Size = new System.Drawing.Size(506, 23);
this.btnTask.TabIndex = 2;
this.btnTask.Text = "Task...";
this.btnTask.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnTask.UseMnemonic = false;
this.btnTask.UseVisualStyleBackColor = true;
//
// tpGeneral
//
this.tpGeneral.Controls.Add(this.panelGeneral);
@ -1131,7 +1083,7 @@ private void InitializeComponent()
// chkRunScreencastCLI
//
this.chkRunScreencastCLI.AutoSize = true;
this.chkRunScreencastCLI.Location = new System.Drawing.Point(336, 14);
this.chkRunScreencastCLI.Location = new System.Drawing.Point(392, 14);
this.chkRunScreencastCLI.Name = "chkRunScreencastCLI";
this.chkRunScreencastCLI.Size = new System.Drawing.Size(117, 17);
this.chkRunScreencastCLI.TabIndex = 14;
@ -1150,9 +1102,9 @@ private void InitializeComponent()
//
// btnScreenRecorderAVIOptions
//
this.btnScreenRecorderAVIOptions.Location = new System.Drawing.Point(232, 11);
this.btnScreenRecorderAVIOptions.Location = new System.Drawing.Point(304, 11);
this.btnScreenRecorderAVIOptions.Name = "btnScreenRecorderAVIOptions";
this.btnScreenRecorderAVIOptions.Size = new System.Drawing.Size(96, 23);
this.btnScreenRecorderAVIOptions.Size = new System.Drawing.Size(80, 23);
this.btnScreenRecorderAVIOptions.TabIndex = 12;
this.btnScreenRecorderAVIOptions.Text = "AVI options...";
this.btnScreenRecorderAVIOptions.UseVisualStyleBackColor = true;
@ -1160,7 +1112,7 @@ private void InitializeComponent()
//
// btnEncoderConfig
//
this.btnEncoderConfig.Location = new System.Drawing.Point(336, 43);
this.btnEncoderConfig.Location = new System.Drawing.Point(344, 43);
this.btnEncoderConfig.Name = "btnEncoderConfig";
this.btnEncoderConfig.Size = new System.Drawing.Size(40, 23);
this.btnEncoderConfig.TabIndex = 11;
@ -1174,7 +1126,7 @@ private void InitializeComponent()
this.cboEncoder.FormattingEnabled = true;
this.cboEncoder.Location = new System.Drawing.Point(48, 44);
this.cboEncoder.Name = "cboEncoder";
this.cboEncoder.Size = new System.Drawing.Size(280, 21);
this.cboEncoder.Size = new System.Drawing.Size(288, 21);
this.cboEncoder.TabIndex = 10;
this.cboEncoder.SelectedIndexChanged += new System.EventHandler(this.cboEncoder_SelectedIndexChanged);
//
@ -1246,9 +1198,9 @@ private void InitializeComponent()
//
this.cbScreenRecorderOutput.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbScreenRecorderOutput.FormattingEnabled = true;
this.cbScreenRecorderOutput.Location = new System.Drawing.Point(72, 12);
this.cbScreenRecorderOutput.Location = new System.Drawing.Point(64, 12);
this.cbScreenRecorderOutput.Name = "cbScreenRecorderOutput";
this.cbScreenRecorderOutput.Size = new System.Drawing.Size(152, 21);
this.cbScreenRecorderOutput.Size = new System.Drawing.Size(232, 21);
this.cbScreenRecorderOutput.TabIndex = 1;
this.cbScreenRecorderOutput.SelectedIndexChanged += new System.EventHandler(this.cbScreenRecorderOutput_SelectedIndexChanged);
//
@ -1257,9 +1209,9 @@ private void InitializeComponent()
this.lblScreenRecorderOutput.AutoSize = true;
this.lblScreenRecorderOutput.Location = new System.Drawing.Point(16, 16);
this.lblScreenRecorderOutput.Name = "lblScreenRecorderOutput";
this.lblScreenRecorderOutput.Size = new System.Drawing.Size(54, 13);
this.lblScreenRecorderOutput.Size = new System.Drawing.Size(42, 13);
this.lblScreenRecorderOutput.TabIndex = 0;
this.lblScreenRecorderOutput.Text = "Recorder:";
this.lblScreenRecorderOutput.Text = "Output:";
//
// cbScreenRecorderFixedDuration
//
@ -1355,38 +1307,6 @@ private void InitializeComponent()
this.btnActionsAdd.UseVisualStyleBackColor = true;
this.btnActionsAdd.Click += new System.EventHandler(this.btnActionsAdd_Click);
//
// lvActions
//
this.lvActions.CheckBoxes = true;
this.lvActions.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.chActionsName,
this.chActionsPath,
this.chActionsArgs});
this.lvActions.FullRowSelect = true;
this.lvActions.Location = new System.Drawing.Point(8, 40);
this.lvActions.MultiSelect = false;
this.lvActions.Name = "lvActions";
this.lvActions.Size = new System.Drawing.Size(496, 280);
this.lvActions.TabIndex = 3;
this.lvActions.UseCompatibleStateImageBehavior = false;
this.lvActions.View = System.Windows.Forms.View.Details;
this.lvActions.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.lvActions_ItemChecked);
//
// chActionsName
//
this.chActionsName.Text = "Name";
this.chActionsName.Width = 100;
//
// chActionsPath
//
this.chActionsPath.Text = "Path";
this.chActionsPath.Width = 250;
//
// chActionsArgs
//
this.chActionsArgs.Text = "Args";
this.chActionsArgs.Width = 134;
//
// btnActionsEdit
//
this.btnActionsEdit.Location = new System.Drawing.Point(88, 8);
@ -1735,6 +1655,86 @@ private void InitializeComponent()
this.chkUseDefaultAdvancedSettings.UseVisualStyleBackColor = true;
this.chkUseDefaultAdvancedSettings.CheckedChanged += new System.EventHandler(this.chkUseDefaultAdvancedSettings_CheckedChanged);
//
// btnAfterCapture
//
this.btnAfterCapture.Location = new System.Drawing.Point(6, 93);
this.btnAfterCapture.Menu = this.cmsAfterCapture;
this.btnAfterCapture.Name = "btnAfterCapture";
this.btnAfterCapture.Size = new System.Drawing.Size(506, 23);
this.btnAfterCapture.TabIndex = 4;
this.btnAfterCapture.Text = "After capture...";
this.btnAfterCapture.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnAfterCapture.UseMnemonic = false;
this.btnAfterCapture.UseVisualStyleBackColor = true;
//
// btnAfterUpload
//
this.btnAfterUpload.Location = new System.Drawing.Point(6, 149);
this.btnAfterUpload.Menu = this.cmsAfterUpload;
this.btnAfterUpload.Name = "btnAfterUpload";
this.btnAfterUpload.Size = new System.Drawing.Size(506, 23);
this.btnAfterUpload.TabIndex = 6;
this.btnAfterUpload.Text = "After upload...";
this.btnAfterUpload.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnAfterUpload.UseMnemonic = false;
this.btnAfterUpload.UseVisualStyleBackColor = true;
//
// btnDestinations
//
this.btnDestinations.Location = new System.Drawing.Point(6, 205);
this.btnDestinations.Menu = this.cmsDestinations;
this.btnDestinations.Name = "btnDestinations";
this.btnDestinations.Size = new System.Drawing.Size(506, 23);
this.btnDestinations.TabIndex = 8;
this.btnDestinations.Text = "Destinations...";
this.btnDestinations.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnDestinations.UseMnemonic = false;
this.btnDestinations.UseVisualStyleBackColor = true;
//
// btnTask
//
this.btnTask.Location = new System.Drawing.Point(6, 37);
this.btnTask.Menu = this.cmsTask;
this.btnTask.Name = "btnTask";
this.btnTask.Size = new System.Drawing.Size(506, 23);
this.btnTask.TabIndex = 2;
this.btnTask.Text = "Task...";
this.btnTask.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnTask.UseMnemonic = false;
this.btnTask.UseVisualStyleBackColor = true;
//
// lvActions
//
this.lvActions.CheckBoxes = true;
this.lvActions.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.chActionsName,
this.chActionsPath,
this.chActionsArgs});
this.lvActions.FullRowSelect = true;
this.lvActions.Location = new System.Drawing.Point(8, 40);
this.lvActions.MultiSelect = false;
this.lvActions.Name = "lvActions";
this.lvActions.Size = new System.Drawing.Size(496, 280);
this.lvActions.TabIndex = 3;
this.lvActions.UseCompatibleStateImageBehavior = false;
this.lvActions.View = System.Windows.Forms.View.Details;
this.lvActions.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.lvActions_ItemChecked);
//
// chActionsName
//
this.chActionsName.Text = "Name";
this.chActionsName.Width = 100;
//
// chActionsPath
//
this.chActionsPath.Text = "Path";
this.chActionsPath.Width = 250;
//
// chActionsArgs
//
this.chActionsArgs.Text = "Args";
this.chActionsArgs.Width = 134;
//
// TaskSettingsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

View file

@ -646,7 +646,6 @@ private void cbScreenRecorderOutput_SelectedIndexChanged(object sender, EventArg
{
TaskSettings.CaptureSettings.ScreenRecordOutput = (ScreenRecordOutput)cbScreenRecorderOutput.SelectedIndex;
btnScreenRecorderAVIOptions.Enabled = TaskSettings.CaptureSettings.ScreenRecordOutput == ScreenRecordOutput.AVI;
chkRunScreencastCLI.Enabled = TaskSettings.CaptureSettings.ScreenRecordOutput != ScreenRecordOutput.GIF;
btnEncoderConfig.Enabled = cboEncoder.Enabled = chkRunScreencastCLI.Enabled && chkRunScreencastCLI.Checked;
}