aboutsummaryrefslogtreecommitdiff
path: root/Source/AddIn/FileDialog.cs
blob: a7e21440ed508e5b3a54237a4b38375220a7e9b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;
        }
    }
}