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() }); }
private void ResetDisplayButton_Click(object sender, EventArgs e) { DisplayConfig = ViewerDisplayConfig.CreateDefault(); LoadDisplayConfigs(); }