Exemplo n.º 1
0
 private void InputBrowseButton_Click(object sender, EventArgs e)
 {
     InputOpenFileDialog.FileName = InputTextBox.Text;
     if (InputOpenFileDialog.ShowDialog() == DialogResult.OK)
     {
         InputTextBox.Text = InputOpenFileDialog.FileName;
     }
 }
Exemplo n.º 2
0
 //开始选择输入文件
 private void SelectInput_Click(object sender, EventArgs e)
 {
     InputOpenFileDialog.Title            = "选取输入文件";
     InputOpenFileDialog.FileName         = "...";
     InputOpenFileDialog.Filter           = "xml文件(*.xml)|*.xml|所有类型 (*.*)|*.*";// "excel文件(*.xlsx)|*.xlsx|旧版excel文件(*.xls)|*.xls|所有类型 (*.*)|*.*";
     InputOpenFileDialog.RestoreDirectory = true;
     InputOpenFileDialog.ShowDialog();
 }