private void LoadSettings()
 {
     if (_settingsLoaded == false)
     {
         var settings = new Settings();
         settings.Load();
         var patterns = settings.Patterns ?? new RegExClassification[0];
         var classifiers =
             (from pattern in patterns
              let test = new Regex(pattern.RegExPattern, pattern.IgnoreCase ? RegexOptions.IgnoreCase : RegexOptions.None)
              select new Classifier
              {
                  Type = pattern.ClassificationType.ToString(),
                  Test = text => test.IsMatch(text)
              }).ToList();
         classifiers.Add(new Classifier
         {
             Type = OutputClassificationDefinitions.BuildText,
             Test = t => true
         });
         _classifiers = classifiers;
         _buildEvents.StopOnBuildErrorEnabled = settings.EnableStopOnBuildError;
         _buildEvents.ShowElapsedBuildTimeEnabled = settings.ShowElapsedBuildTime;
         _buildEvents.ShowBuildReport = settings.ShowBuildReport;
         _buildEvents.ShowDebugWindowOnDebug = settings.ShowDebugWindowOnDebug;
     }
     _settingsLoaded = true;
 }
 public override void LoadSettingsFromStorage()
 {
     var settings = new Settings();
     settings.Load();
     RegExPatterns = settings.Patterns;
     StopOnFirstBuildError = settings.EnableStopOnBuildError;
     ShowElapsedBuildTime = settings.ShowElapsedBuildTime;
     ShowBuildReport = settings.ShowBuildReport;
     ShowDebugWindowOnDebug = settings.ShowDebugWindowOnDebug;
 }
 public override void SaveSettingsToStorage()
 {
     var settings = new Settings
     {
         Patterns = RegExPatterns,
         EnableStopOnBuildError = StopOnFirstBuildError,
         ShowElapsedBuildTime = ShowElapsedBuildTime,
         ShowBuildReport = ShowBuildReport,
         ShowDebugWindowOnDebug = ShowDebugWindowOnDebug
     };
     settings.Save();
 }