Allow changing output directory

Closes #5
This commit is contained in:
2026-03-03 09:28:03 +09:00
parent 193f57df02
commit 03da58277e
5 changed files with 124 additions and 19 deletions
+26
View File
@@ -13,11 +13,23 @@ class Settings : ChangeNotifier
{
private string _lastUsedPath;
private bool _useDocnetPDFImageRendering;
private bool _saveOutputPdfInWorkingDir;
private string _outputPdfDir;
public Settings()
{
_lastUsedPath = "";
_useDocnetPDFImageRendering = true;
_saveOutputPdfInWorkingDir = true;
_outputPdfDir = "";
}
public Settings(Settings other)
{
_lastUsedPath = other.LastUsedPath;
_useDocnetPDFImageRendering = other.UseDocnetPDFImageRendering;
_saveOutputPdfInWorkingDir = other.SaveOutputPdfInWorkingDir;
_outputPdfDir = other.OutputPdfDir;
}
[JsonInclude]
@@ -35,6 +47,20 @@ class Settings : ChangeNotifier
set { _useDocnetPDFImageRendering = value; NotifyPropertyChanged(); }
}
[JsonInclude]
public bool SaveOutputPdfInWorkingDir
{
get => _saveOutputPdfInWorkingDir;
set { _saveOutputPdfInWorkingDir = value; NotifyPropertyChanged(); }
}
[JsonInclude]
public string OutputPdfDir
{
get => _outputPdfDir;
set { _outputPdfDir = value; NotifyPropertyChanged(); }
}
public static string GetSettingsFileName()
{
return "settings.json";