C# Class FrequencyAnalyzer.WorkerManager

Responsible for running the BackgroundWorker responsible for calculating word frequencies, and for creating the taskpane which is to display results to the user.
Show file Open project: angusmacdonald/word-frequency-analyzer Class Usage Examples

Public Methods

Method Description
WorkerManager ( ) : System.ComponentModel

Sets up hooks for background worker.

createTaskPane ( ) : void
runBackgroundWorker ( bool saveresult ) : void

Runs the worker if no other worker instance is already running.

stopComputation ( ) : void

Cancel the background worker.

Private Methods

Method Description
bgWorker_DoWork ( object sender, DoWorkEventArgs e ) : void

Starts the calculation of word frequencies by getting an array of all words in the current document.

bgWorker_ProgressChanged ( object sender, ProgressChangedEventArgs e ) : void
bgWorker_RunWorkerCompleted ( object sender, RunWorkerCompletedEventArgs e ) : void

Called once the frequencies have been calculated.

Method Details

WorkerManager() public method

Sets up hooks for background worker.
public WorkerManager ( ) : System.ComponentModel
return System.ComponentModel

createTaskPane() public method

public createTaskPane ( ) : void
return void

runBackgroundWorker() public method

Runs the worker if no other worker instance is already running.
public runBackgroundWorker ( bool saveresult ) : void
saveresult bool
return void

stopComputation() public method

Cancel the background worker.
public stopComputation ( ) : void
return void