Show error if output dir does not exist

This commit is contained in:
2026-03-03 09:43:47 +09:00
parent 3e91edb457
commit abc97eea2b
2 changed files with 18 additions and 4 deletions
+10 -1
View File
@@ -63,6 +63,7 @@ class SettingsViewModel: ChangeNotifier
{
_settings.OutputPdfDir = value;
NotifyPropertyChanged();
NotifyPropertyChanged(nameof(IsOutputPdfDirValid));
}
}
@@ -122,6 +123,14 @@ class SettingsViewModel: ChangeNotifier
public void Save()
{
DialogHost.Close("DialogHost", _settings);
if (!IsOutputPdfDirValid)
{
ErrorMessage = "Output directory cannot be found!";
}
else
{
ErrorMessage = "";
DialogHost.Close("DialogHost", _settings);
}
}
}