private void SourceFileButton_Click(object sender, EventArgs e) { //Show Dialog DialogResult result = SourceFileDialog.ShowDialog(); if (result == DialogResult.OK) { //Set file name SourceFileText.Text = SourceFileDialog.FileName; TargetFileDialog.FileName = changeExtension(SourceFileDialog.SafeFileName); TargetFileText.Text = changeExtension(SourceFileText.Text); Video_DefaultOptions(); Audio_DefaultOptions(); //Check if it's the first time since program started if (firstTime) { //Enable all options outputVideo.Enabled = true; outputAudio.Enabled = true; firstTime = false; } } //Debugger Console.WriteLine(result); }
private void SourceButton_Click(object sender, EventArgs e) { SourceFileDialog.ShowDialog(); if (string.IsNullOrEmpty(SourceFileDialog.FileName)) { return; } SourceText.Text = SourceFileDialog.FileName; }
private void ChooseSourceFileButton_Click(object sender, EventArgs e) { if (SourceFileDialog.ShowDialog() == DialogResult.OK) { try { SourceTextBox.Text = SourceFileDialog.FileName; } catch (SecurityException ex) { MessageBox.Show($"Security error.\n\nError message: {ex.Message}\n\nDetails:\n\n{ex.StackTrace}"); } } }
private void ChooseSourceButton_Click(object sender, EventArgs e) { SourceFileDialog.ShowDialog(); }