예제 #1
0
 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);
 }
예제 #2
0
 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;
 }