mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 10:27:18 +02:00
27 lines
716 B
C#
27 lines
716 B
C#
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);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|