diff --git a/ScreenCaptureLib/Screencast/FFmpegCLIOptionsForm.Designer.cs b/ScreenCaptureLib/Screencast/FFmpegCLIOptionsForm.Designer.cs index edcd49e9f..fdd1596c5 100644 --- a/ScreenCaptureLib/Screencast/FFmpegCLIOptionsForm.Designer.cs +++ b/ScreenCaptureLib/Screencast/FFmpegCLIOptionsForm.Designer.cs @@ -90,7 +90,7 @@ private void InitializeComponent() 0, 0, 0}); - this.nudCRF.ValueChanged += new System.EventHandler(this.nudCRF_ValueChanged); + // // nudQscale // @@ -115,7 +115,7 @@ private void InitializeComponent() 0, 0, 0}); - this.nudQscale.ValueChanged += new System.EventHandler(this.nudQscale_ValueChanged); + // // comboBoxExtension // @@ -130,7 +130,7 @@ private void InitializeComponent() this.comboBoxExtension.Size = new System.Drawing.Size(121, 21); this.comboBoxExtension.TabIndex = 15; this.comboBoxExtension.Text = "mp4"; - this.comboBoxExtension.SelectedValueChanged += new System.EventHandler(this.comboBoxExtension_SelectedValueChanged); + // // lblCodec // @@ -159,7 +159,7 @@ private void InitializeComponent() this.comboBoxPreset.Name = "comboBoxPreset"; this.comboBoxPreset.Size = new System.Drawing.Size(121, 21); this.comboBoxPreset.TabIndex = 19; - this.comboBoxPreset.SelectedIndexChanged += new System.EventHandler(this.comboBoxPreset_SelectedIndexChanged); + // // lblPreset // diff --git a/ScreenCaptureLib/Screencast/FFmpegCLIOptionsForm.cs b/ScreenCaptureLib/Screencast/FFmpegCLIOptionsForm.cs index 2e5af698a..d9669aea6 100644 --- a/ScreenCaptureLib/Screencast/FFmpegCLIOptionsForm.cs +++ b/ScreenCaptureLib/Screencast/FFmpegCLIOptionsForm.cs @@ -43,25 +43,20 @@ private void LoadSettings() textBoxFFmpegPath.Text = Options.CLIPath; } - private void comboBoxCodec_SelectedIndexChanged(object sender, EventArgs e) + private void SaveSettings() { Options.VideoCodec = (FFmpegVideoCodec)comboBoxCodec.SelectedIndex; - UpdateUI(); - } - - private void comboBoxExtension_SelectedValueChanged(object sender, EventArgs e) - { Options.Extension = comboBoxExtension.Text; - } - private void nudCRF_ValueChanged(object sender, EventArgs e) - { Options.CRF = (int)nudCRF.Value; + Options.Preset = (FFmpegPreset)comboBoxPreset.SelectedIndex; + + Options.qscale = (int)nudQscale.Value; } - private void comboBoxPreset_SelectedIndexChanged(object sender, EventArgs e) + private void comboBoxCodec_SelectedIndexChanged(object sender, EventArgs e) { - Options.Preset = (FFmpegPreset)comboBoxPreset.SelectedIndex; + UpdateUI(); } public void UpdateUI() @@ -73,6 +68,7 @@ public void UpdateUI() private void btnOK_Click(object sender, EventArgs e) { DialogResult = DialogResult.OK; + SaveSettings(); Close(); } @@ -82,11 +78,6 @@ private void btnCancel_Click(object sender, EventArgs e) Close(); } - private void nudQscale_ValueChanged(object sender, EventArgs e) - { - Options.qscale = (int)nudQscale.Value; - } - private void buttonFFmpegBrowse_Click(object sender, EventArgs e) { Helpers.BrowseFile("Browse for ffmpeg.exe", textBoxFFmpegPath, Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles));