diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2022-02-08 16:10:45 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2022-02-08 16:10:45 +0300 |
commit | b954844de9e6ab3f45ee90a67e900ba57ef74ec4 (patch) | |
tree | e10408ba23e463da16d495a547c0b783b0953efb /src/Interface | |
parent | 14a122546258005783703329424b9992a8db501b (diff) |
Keep workbook open on save as dialog cancellation
Diffstat (limited to 'src/Interface')
-rw-r--r-- | src/Interface/Dialog.cs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/Interface/Dialog.cs b/src/Interface/Dialog.cs index 23f65d7..e6c7955 100644 --- a/src/Interface/Dialog.cs +++ b/src/Interface/Dialog.cs @@ -46,12 +46,7 @@ namespace RehauSku.Interface dialog.FileName = workbook.Name; dialog.Filter = "Файлы Excel (*.xls;*.xlsx;*.xlsm)|*.xls;*.xlsx;*.xlsm"; - if (dialog.ShowDialog() == DialogResult.Cancel) - { - workbook.Close(false); - } - - else + if (dialog.ShowDialog() == DialogResult.OK) { string fileName = dialog.FileName; workbook.SaveAs(fileName); |