Поменял на savefiledialog
This commit is contained in:
parent
e1d5ffe478
commit
b78f933bd7
@ -45,16 +45,16 @@ namespace WinFormsApp
|
||||
{
|
||||
var filePath = string.Empty;
|
||||
|
||||
using (OpenFileDialog openFileDialog = new OpenFileDialog())
|
||||
using (SaveFileDialog saveFileDialog = new SaveFileDialog())
|
||||
{
|
||||
openFileDialog.InitialDirectory = "d:\\tmp";
|
||||
openFileDialog.Filter = "Excel files (*.xlsx)|*.xlsx|All files (*.*)|*.*";
|
||||
openFileDialog.FilterIndex = 1;
|
||||
openFileDialog.RestoreDirectory = true;
|
||||
saveFileDialog.InitialDirectory = "d:\\tmp";
|
||||
saveFileDialog.Filter = "Excel files (*.xlsx)|*.xlsx|All files (*.*)|*.*";
|
||||
saveFileDialog.FilterIndex = 1;
|
||||
saveFileDialog.RestoreDirectory = true;
|
||||
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
filePath = openFileDialog.FileName;
|
||||
filePath = saveFileDialog.FileName;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user