Json importer ready

This commit is contained in:
Mikhail Shabanov committed 2020-12-29 19:23:02 +01:00
1 parent ccc5c768b3
commit 26e469d69d
15 files changed
+971 -9

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
using System.Windows.Forms;
#nullable enable
namespace DataImporterTool.Dialogs
{
public class DialogService : IDialogService
{
public string? ChooseFolder()
{
using (var fbd = new FolderBrowserDialog())
{
var result = fbd.ShowDialog();
if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(fbd.SelectedPath))
{
return fbd.SelectedPath;
}
}
return null;
}
public void ShowWarning(string warningMessage)
{
MessageBox.Show(warningMessage, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
}
@@ -0,0 +1,10 @@
#nullable enable
namespace DataImporterTool.Dialogs
{
public interface IDialogService
{
string? ChooseFolder();
void ShowWarning(string warningMessage);
}
}