public WordCloudForm(string text) { InitializeComponent(); IProgressIndicator progress = new ProgressBarWrapper(progressBar1); IEnumerable <string> terms = new StringExtractor(text, progress); cloudControl.WeightedWords = terms.CountOccurences().SortByOccurences(); progressBar1.Hide(); }
private void cmbSelectWindow_SelectedIndexChanged(object sender, EventArgs e) { if (cmbSelectWindow.SelectedIndex != 0 && selectWindowReady) { IProgressIndicator progress = new ProgressBarWrapper(progressBar); string timeSlotID = cmbSelectWindow.SelectedValue.ToString(); SingleWindow sw = _slidingWindows.GetWindow(timeSlotID); IEnumerable <string> terms = new StringExtractor(Util.GenerateText(sw.CandidateTopics).ToString(), progress); myCloudControl.WeightedWords = terms .CountOccurences() .SortByOccurences(); progressBar.Visible = false; pnlWordCloud.Visible = true; rTxtResults.Visible = false; } }