RhSolutions-AddIn/Source/AddIn/FileDialog.cs

25 lines
534 B
C#
Raw Normal View History

2021-12-22 17:07:37 +03:00
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;
}
}
}