diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2023-03-22 08:36:13 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2023-03-22 08:36:13 +0300 |
commit | 4f448f203471a19a1444555a895f503515ad2fda (patch) | |
tree | 301b7df2561d650e4d300d24341342bd77ac7f3e /src/Models/Dialog.cs | |
parent | 6484cac4f025bd84f7ffa2b2030d729dafe09d3d (diff) |
Add basic test
Diffstat (limited to 'src/Models/Dialog.cs')
-rw-r--r-- | src/Models/Dialog.cs | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/Models/Dialog.cs b/src/Models/Dialog.cs deleted file mode 100644 index abc89b8..0000000 --- a/src/Models/Dialog.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.Office.Interop.Excel; -using System.Collections.Generic; -using System.Windows.Forms; - -namespace RhSolutions.Models -{ - static class Dialog - { - public static string GetFilePath() - { - using (OpenFileDialog dialog = new OpenFileDialog()) - { - dialog.Filter = "Файлы Excel (*.xls;*.xlsx;*.xlsm)|*.xls;*.xlsx;*.xlsm"; - - if (dialog.ShowDialog() == DialogResult.OK) - { - return dialog.FileName; - } - - else return string.Empty; - } - } - - public static string[] GetMultiplyFiles() - { - using (OpenFileDialog dialog = new OpenFileDialog()) - { - dialog.Filter = "Файлы Excel (*.xls;*.xlsx;*.xlsm)|*.xls;*.xlsx;*.xlsm"; - dialog.Multiselect = true; - - if (dialog.ShowDialog() == DialogResult.OK) - { - return dialog.FileNames; - } - - else return null; - } - } - } -} |