From ce5597d042062c820288c63b4e571ee77ac23ab0 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Wed, 22 Dec 2021 17:07:37 +0300 Subject: RegistryUtil and some fixes --- Source/AddIn/FileDialog.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Source/AddIn/FileDialog.cs (limited to 'Source/AddIn/FileDialog.cs') diff --git a/Source/AddIn/FileDialog.cs b/Source/AddIn/FileDialog.cs new file mode 100644 index 0000000..a7e2144 --- /dev/null +++ b/Source/AddIn/FileDialog.cs @@ -0,0 +1,24 @@ +using System.Windows.Forms; + +namespace RehauSku +{ + static class FileDialog + { + public static string GetFilePath() + { + string filePath = string.Empty; + + using (OpenFileDialog dialog = new OpenFileDialog()) + { + dialog.Filter = "Все файлы (*.*)|*.*"; + + if (dialog.ShowDialog() == DialogResult.OK) + { + filePath = dialog.FileName; + } + } + + return filePath; + } + } +} -- cgit v1.2.3