RhSolutions-AddIn/Source/AddIn/FileDialog.cs
2021-12-22 17:07:37 +03:00

25 lines
534 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;
}
}
}