private static bool InitializePreferences(IPreferenceSet prefs, ILogger logger, bool reset) { try { if (reset) { prefs.Reset(); } else { prefs.Initialize(); } } catch (Exception ex) { ShowStartupError(ex, Properties.Resources.UserPreferencesFailed); return(false); } // set logging level from prefs ((Core.Logging.Logger)logger).Level = (LoggerLevel)prefs.Get <int>(Preference.MessageLevel); return(true); }
private static bool InitializePreferences(IPreferenceSet prefs, ILogger logger, bool reset) { try { if (reset) { prefs.Reset(); } else { prefs.Initialize(); } } catch (Exception ex) { ShowStartupError(ex, Properties.Resources.UserPreferencesFailed); return false; } // set logging level from prefs ((Core.Logging.Logger)logger).Level = (LoggerLevel)prefs.Get<int>(Preference.MessageLevel); return true; }