private static void Initialize() { InitializeAppDataFolder(); if (File.Exists(AppConfigPath)) { _Current = LoadAppConfig(); } if (_Current == null) { _Current = AppConfig.CreateDefault(); SaveAppConfig(_Current); } if (_Current.DisplayConfig == null || _Current.ExportConfig == null) { if (_Current.DisplayConfig == null) { _Current.DisplayConfig = ViewerDisplayConfig.CreateDefault(); } if (_Current.ExportConfig == null) { _Current.ExportConfig = LayoutExportConfig.CreateDefault(); } SaveAppConfig(_Current); } initialized = true; }
public static AppConfig CreateDefault() { return(new AppConfig() { MaxRecentFileHistory = 10, ExportConfig = LayoutExportConfig.CreateDefault(), DisplayConfig = ViewerDisplayConfig.CreateDefault() }); }