public void LoadConfig() { try { if (_cfg.AppSettings.Settings.AllKeys.Contains(ConfigConstants.FileLogs) == true) { _fileLogs.Clear(); LogFiles cc = LogFiles.Load(_cfg.AppSettings.Settings[ConfigConstants.FileLogs].Value); if (cc != null) { cc.Files.ForEach(x => _fileLogs.Add(x)); } } this.parserLogsGrid.ItemsSource = this.Logs; this.parserLogsGrid.SelectedIndex = 0; } catch (Exception ex) { Nagios.Net.Client.Log.WriteLog(string.Format("{0}\n{1}", ex.Message, ex.StackTrace), true); } }