mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 17:56:51 +13:00
CLI Video Encoder GUI fixes
This commit is contained in:
parent
518557012f
commit
70673cd52a
3 changed files with 30 additions and 17 deletions
|
@ -504,7 +504,9 @@ private void btnEncodersEdit_Click(object sender, EventArgs e)
|
|||
|
||||
private void btnEncoderDuplicate_Click(object sender, EventArgs e)
|
||||
{
|
||||
lvEncoders.SelectedItems.Cast<ListViewItem>().Select(x => ((VideoEncoder)x.Tag).Copy()).ToList().ForEach(x => AddVideoEncoder(x));
|
||||
var encoders = lvEncoders.SelectedItems.Cast<ListViewItem>().Select(x => ((VideoEncoder)x.Tag).Copy()).ToList();
|
||||
encoders.ForEach(x => AddVideoEncoder(x));
|
||||
encoders.ForEach(x => Program.Settings.VideoEncoders.Add(x));
|
||||
}
|
||||
|
||||
private void btnEncodersRemove_Click(object sender, EventArgs e)
|
||||
|
|
15
ShareX/Forms/TaskSettingsForm.Designer.cs
generated
15
ShareX/Forms/TaskSettingsForm.Designer.cs
generated
|
@ -148,6 +148,7 @@ 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.btnEncoderConfig = new System.Windows.Forms.Button();
|
||||
this.tcHotkeySettings.SuspendLayout();
|
||||
this.tpTask.SuspendLayout();
|
||||
this.cmsDestinations.SuspendLayout();
|
||||
|
@ -1003,6 +1004,7 @@ private void InitializeComponent()
|
|||
//
|
||||
// tpScreenRecorder
|
||||
//
|
||||
this.tpScreenRecorder.Controls.Add(this.btnEncoderConfig);
|
||||
this.tpScreenRecorder.Controls.Add(this.cboEncoder);
|
||||
this.tpScreenRecorder.Controls.Add(this.nudScreenRecorderDuration);
|
||||
this.tpScreenRecorder.Controls.Add(this.lblScreenRecorderStartDelay);
|
||||
|
@ -1026,7 +1028,7 @@ private void InitializeComponent()
|
|||
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.Size = new System.Drawing.Size(296, 21);
|
||||
this.cboEncoder.TabIndex = 10;
|
||||
this.cboEncoder.SelectedIndexChanged += new System.EventHandler(this.cboEncoder_SelectedIndexChanged);
|
||||
//
|
||||
|
@ -1558,6 +1560,16 @@ private void InitializeComponent()
|
|||
this.chkUseDefaultAdvancedSettings.UseVisualStyleBackColor = true;
|
||||
this.chkUseDefaultAdvancedSettings.CheckedChanged += new System.EventHandler(this.chkUseDefaultAdvancedSettings_CheckedChanged);
|
||||
//
|
||||
// btnEncoderConfig
|
||||
//
|
||||
this.btnEncoderConfig.Location = new System.Drawing.Point(504, 12);
|
||||
this.btnEncoderConfig.Name = "btnEncoderConfig";
|
||||
this.btnEncoderConfig.Size = new System.Drawing.Size(40, 23);
|
||||
this.btnEncoderConfig.TabIndex = 11;
|
||||
this.btnEncoderConfig.Text = "...";
|
||||
this.btnEncoderConfig.UseVisualStyleBackColor = true;
|
||||
this.btnEncoderConfig.Click += new System.EventHandler(this.btnEncoderConfig_Click);
|
||||
//
|
||||
// TaskSettingsForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -1745,6 +1757,7 @@ private void InitializeComponent()
|
|||
private System.Windows.Forms.ComboBox cbImageFileExist;
|
||||
private System.Windows.Forms.Label lblImageFileExist;
|
||||
private System.Windows.Forms.ComboBox cboEncoder;
|
||||
private System.Windows.Forms.Button btnEncoderConfig;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ public partial class TaskSettingsForm : Form
|
|||
private ToolStripDropDownItem tsmiImageFileUploaders, tsmiTextFileUploaders;
|
||||
private bool loaded;
|
||||
|
||||
private readonly string ConfigureEncoder = "<--- configure video encoders --->";
|
||||
private readonly string ConfigureEncoder = "Configure video encoders --->";
|
||||
|
||||
public TaskSettingsForm(TaskSettings hotkeySetting, bool isDefault = false)
|
||||
{
|
||||
|
@ -208,7 +208,7 @@ private void UpdateVideoEncoders()
|
|||
Program.Settings.VideoEncoders.ForEach(x => cboEncoder.Items.Add(x));
|
||||
cboEncoder.SelectedIndex = TaskSettings.CaptureSettings.VideoEncoderSelected.BetweenOrDefault(0, Program.Settings.VideoEncoders.Count - 1);
|
||||
}
|
||||
if (!cboEncoder.Items.Contains(ConfigureEncoder))
|
||||
else if (!cboEncoder.Items.Contains(ConfigureEncoder))
|
||||
{
|
||||
cboEncoder.Items.Add(ConfigureEncoder);
|
||||
}
|
||||
|
@ -619,21 +619,9 @@ private void cbScreenRecorderOutput_SelectedIndexChanged(object sender, EventArg
|
|||
}
|
||||
|
||||
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
|
||||
{
|
||||
TaskSettings.CaptureSettings.VideoEncoderSelected = cboEncoder.SelectedIndex;
|
||||
}
|
||||
}
|
||||
|
||||
private void nudScreenRecorderFPS_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
@ -656,6 +644,16 @@ private void nudScreenRecorderStartDelay_ValueChanged(object sender, EventArgs e
|
|||
TaskSettings.CaptureSettings.ScreenRecordStartDelay = (float)nudScreenRecorderStartDelay.Value;
|
||||
}
|
||||
|
||||
private void btnEncoderConfig_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (ApplicationSettingsForm form = new ApplicationSettingsForm())
|
||||
{
|
||||
form.SelectProfilesTab();
|
||||
form.ShowDialog();
|
||||
UpdateVideoEncoders();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Screen recorder
|
||||
|
||||
#region Actions
|
||||
|
|
Loading…
Reference in a new issue