public override void Initialize() { Settings = SettingsVM.Load(); if (Settings == null) { Settings = new SettingsVM(); } else { Settings.IsPropertiesInitialized = true; } try { if (File.Exists(_logFilePath)) { Log = File.ReadAllText(_logFilePath); } } catch (Exception ex) { AddToLog(string.Format("Getting file: {0}, Error: {1}", _logFilePath, ex.Message)); } Settings.Initialize(); base.Initialize(); }
public static SettingsVM Load() { if (File.Exists(SettingsVM._settingsFilePath)) { return(SettingsVM.loadXmlFileAsync <SettingsVM>(SettingsVM._settingsFilePath)); } else { return(null); } }
public MainVM() { _settings = new SettingsVM(); Instance = this; }