private void LoadSettings() { try { var set = _repositorySettings.LoadSettings(); _settings = new Data.AppSettings(this) { CollectionTheme = ThemeManager.Current.Themes, CurrentTheme = ThemeManager.Current.ChangeTheme(Application.Current, set.Theme), ApiKeyFssp = set.ApiKeyFssp, TypeGrid = new TypeGrid(this) { TypeGridViewItem = (EnumTypeGridViewItem)Enum.Parse(typeof(EnumTypeGridViewItem), set.TypeGrid) }, CanMemorizeMenu = set.CanMemorizeMenu, LastMenu = set.LastMenu }; } catch (Exception ex) { // тут будет логер когда нибудь _settings = new Data.AppSettings(this) { CollectionTheme = ThemeManager.Current.Themes, CurrentTheme = ThemeManager.Current.DetectTheme(), TypeGrid = new TypeGrid(this), LastMenu = 0 }; } }
private void LoadSettings() { _settings = new Data.Settings() { CollectionTheme = ThemeManager.Current.Themes, CurrentTheme = ThemeManager.Current.DetectTheme() }; try { var set = _repositorySettings.LoadSettings(); _settings.CurrentTheme = ThemeManager.Current.ChangeTheme(Application.Current, set.Theme); } catch (Exception ex) { // тут будет логер когда нибудь } }