Add binding member for data grid date format
This commit is contained in:
@@ -67,6 +67,7 @@ class MainViewModel : BaseViewModel, IFontResolver, ICanCheckShutdown
|
||||
_reportTitle = "";
|
||||
_lastGeneratedTime = null;
|
||||
_settings = Settings.LoadSettings();
|
||||
NotifyPropertyChanged(nameof(DataGridDateFormat));
|
||||
if (!string.IsNullOrWhiteSpace(_settings.LastUsedPath))
|
||||
{
|
||||
LogInfo("Loading data at last used path of {0}", _settings.LastUsedPath);
|
||||
@@ -173,6 +174,11 @@ class MainViewModel : BaseViewModel, IFontResolver, ICanCheckShutdown
|
||||
}
|
||||
}
|
||||
|
||||
public string DataGridDateFormat
|
||||
{
|
||||
get => _settings.DataGridDateFormat;
|
||||
}
|
||||
|
||||
private void LogInfo(string message, params object[]? arguments)
|
||||
{
|
||||
var timestamp = string.Format("[{0:s}]", DateTime.Now);
|
||||
@@ -299,6 +305,7 @@ class MainViewModel : BaseViewModel, IFontResolver, ICanCheckShutdown
|
||||
_settings = (Settings)updatedSettings;
|
||||
await _settings.SaveSettingsAsync();
|
||||
LogInfo("Saved updated settings!");
|
||||
NotifyPropertyChanged(nameof(DataGridDateFormat));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user