private DialogResult ShowOutputFileDialog(ref string CurrentFilePath) { OutputFileDialog.Title = "Specify Output File"; OutputFileDialog.CheckPathExists = true; OutputFileDialog.CheckFileExists = false; OutputFileDialog.OverwritePrompt = false; OutputFileDialog.InitialDirectory = ProgramController.GetPath(CurrentFilePath); string CleanFileType = null; if (CurrentFilePath == null) { OutputFileDialog.Filter = "All Files (*.*) | *.*"; OutputFileDialog.FilterIndex = 1; } else { CleanFileType = ProgramController.GetCleanFileType(CurrentFilePath); OutputFileDialog.DefaultExt = CleanFileType; OutputFileDialog.Filter = "Output Files (*." + CleanFileType + ") | *." + CleanFileType + " | All Files (*.*) | *.*"; OutputFileDialog.FilterIndex = 2; } OutputFileDialog.FileName = ProgramController.GetFileName(CurrentFilePath); DialogResult result = OutputFileDialog.ShowDialog(this); if (result == DialogResult.OK) { CurrentFilePath = OutputFileDialog.FileName; } return(result); }
private void OutputFilenameButton_Click(object sender, EventArgs e) { if (OutputFileDialog.ShowDialog() == DialogResult.OK) { OutputFilename.Text = OutputFileDialog.FileName; } }
private void BrowseOutputFileButton_Click(object sender, EventArgs e) { OutputFileDialog.FileName = OutputFileTextBox.Text; if (OutputFileDialog.ShowDialog() == DialogResult.OK) { OutputFileTextBox.Text = OutputFileDialog.FileName; } }
//开始选择输出文件 private void SelectOutput(object sender, EventArgs e) { OutputFileDialog.Title = "选取输出文件"; OutputFileDialog.FileName = "Output.xml"; //OutputFileDialog.Filter = "xml文件(*.xml)|*.xml|所有类型 (*.*)|*.*";// "excel文件(*.xlsx)|*.xlsx|旧版excel文件(*.xls)|*.xls|所有类型 (*.*)|*.*"; OutputFileDialog.RestoreDirectory = true; OutputFileDialog.ShowDialog(); }
private void OutputBrowseButton_Click(object sender, EventArgs e) { Status.StopVisualFeedback(); if (Util.OutputPath != string.Empty) { OutputFileDialog.InitialDirectory = Util.OutputPath; } if (OutputFileDialog.ShowDialog() == DialogResult.OK) { OutputTextBox.Text = OutputFileDialog.FileName; Status.UpdatePath(); } }
private void OutputFileButton_Click(object sender, EventArgs e) { OutputFileDialog.AddExtension = true; OutputFileDialog.DefaultExt = ".iso"; OutputFileDialog.FileName = "patched.iso"; OutputFileDialog.Filter = "ISO file (*.iso)|*.iso"; OutputFileDialog.ShowDialog(); var path = OutputFileDialog.FileName; OutputFileText.Text = path; TryEnableApplyButton(); }
private void OutputFileButton_Click(object sender, EventArgs e) { OutputFileDialog.ShowDialog(); }