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