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