private void parseHtml(KlockworkHtmlProcessor processor) { processor.UpdateProcessingProgessEventHandler += new EventHandler <UpdateProcessingProgessEventArgs>(KlockworkLogParsingProgressUpdateEventHander); processor.Start(keyReader.KeywordCollections); processor.UpdateProcessingProgessEventHandler -= new EventHandler <UpdateProcessingProgessEventArgs>(KlockworkLogParsingProgressUpdateEventHander); btnExport.Enabled = processor.AllParsedMessagesList.Count > 0; }
private void showParsedResult(KlockworkHtmlProcessor currentProcessor) { if (currentProcessor != null) { tabCtlMain.TabPages.Clear(); foreach (KeyValuePair <String, List <KlockworkParsedMessage> > keyval in currentProcessor.AllParsedMessagesList) { KlockworkParsedResultTabPage newTabPage = new KlockworkParsedResultTabPage(keyval); tabCtlMain.TabPages.Add(newTabPage); } tabCtlMain.Show(); currentProcessor.UpdateProcessingProgessEventHandler -= new EventHandler <UpdateProcessingProgessEventArgs>(KlockworkLogParsingProgressUpdateEventHander); } }
private void cmbHtmlFiles_SelectedIndexChanged(object sender, EventArgs e) { int index = cmbHtmlFiles.SelectedIndex; if (index >= 0 && currentSelectedIndex != index && lstHtmlProcessors.Count > index) { this.Cursor = Cursors.WaitCursor; currentSelectedIndex = index; currentProcessor = lstHtmlProcessors[index]; showParsedResult(lstHtmlProcessors[index]); btnExport.Enabled = currentProcessor.AllParsedMessagesList.Count > 0; this.Cursor = Cursors.Default; } }
private void showHtmlFileListAndPreparingHtmlProcessor(String[] htmlFiles) { txtHtmlDirectory.Text = htmlDirectory; foreach (String file in htmlFiles) { cmbHtmlFiles.Items.Add(file.Remove(0, htmlDirectory.Length)); KlockworkHtmlProcessor htmlProcessor = new KlockworkHtmlProcessor(file); lstHtmlProcessors.Add(htmlProcessor); } if (cmbHtmlFiles.Items.Count > 0) { cmbHtmlFiles.SelectedIndex = 0; } }