private List <LogMessage> filterSources(List <LogMessage> inputLogs) { List <LogMessage> logs = new List <LogMessage>(); for (int i = 0; i < sourceCheckedListBox.CheckedItems.Count; i++) { if (sourceCheckedListBox.GetItemChecked(i)) { logs.AddRange(LogAnalyzer.GetListWIthMessageSource(inputLogs, sourceCheckedListBox.Items[i].ToString())); } } return(logs); }
private void filterDisplayDatarid() { List <LogMessage> logs = new List <LogMessage>(); if (infoChkBox.Checked) { logs.AddRange(LogAnalyzer.GetListWIthMessageType(logModel.GetLogs(), LogMessage.MessageType.Info)); } if (warningChkBox.Checked) { logs.AddRange(LogAnalyzer.GetListWIthMessageType(logModel.GetLogs(), LogMessage.MessageType.Warning)); } if (errorChkBox.Checked) { logs.AddRange(LogAnalyzer.GetListWIthMessageType(logModel.GetLogs(), LogMessage.MessageType.Error)); } logs = filterSources(logs); this.logDataGridView.Rows.Clear(); drawDataGrid(logs); }