diff --git a/WinFormSolution/WinFormsApp/FormNoVisual.cs b/WinFormSolution/WinFormsApp/FormNoVisual.cs index 6fbfe00..235dbdf 100644 --- a/WinFormSolution/WinFormsApp/FormNoVisual.cs +++ b/WinFormSolution/WinFormsApp/FormNoVisual.cs @@ -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; } }