public runBackgroundWorker ( bool saveresult ) : void | ||
saveresult | bool | |
Результат | void |
private void recalculatebutton_Click(object sender, EventArgs e) { if (calculating) { //This means the button has been pressed to stop the computation. progressBar.Visible = false; progressBar.Value = 0; recalculatebutton.Text = "Calculate"; calcLabel.Text = "Analysis terminated."; calculating = false; manager.stopComputation(); } else { //This means the button has been pressed to re-calculate everything. calcLabel.Text = "Calculating results."; progressBar.Visible = true; calcLabel.Visible = true; totalwords.Visible = false; uniquewords.Visible = false; resultsbox.Visible = false; recalculatebutton.Text = "Terminate Calculation"; manager.runBackgroundWorker(false); } }
/// <summary> /// Calculate the word frequencies and display them in the pane. /// </summary> /// <param name="sender">Unused</param> /// <param name="e">Unused</param> private void freq_analyzer_Click(object sender, RibbonControlEventArgs e) { workermanager.createTaskPane(); workermanager.runBackgroundWorker(false); }