Simon Bridewell - 2010-04-05

Changes in version 0.1.3747.31708:

AboutForm - constructors are now private and the new static Show method should be used to display the form.

ExceptionForm - now has a PropertyGrid to display all the properties of the exception.

New CommonForms.Responsiveness namespace. This contains all the new features, designed to assist in running a long-running process on a background thread, whilst keeping the application responsive and providing progress feedback to the user. This namespace consists of the following classes:

* LongRunningProcess. This is a base class for classes which perform long-running processes and provides AddCounter and RemoveCounter methods which you can use within the processes to define and remove counters by which the progress of the process can be measured. It also provides a property called MyProgressCounters which exposes a collection of the counters currently added to the process. Set the Value property of one of these counters to indicate the progress of the process.

* ResponsiveForm. This is a base class for forms which start off long-running processes on a background thread. It provides a StartBackgroundProcess method which will start the long-running process on a background thread. Ensure that the process invokes the StopTheClock method once it is complete. The ResponsiveForm will display and update a form containing a progress bar for each progress counter currently defined by the process. It handles the scenario of the user closing the form whist the process is still running, and ensures that particular types of child control on the form are disabled when the process starts and re-enabled once it completes. Override the TypesToDisable property to change the types of control which are disabled in this way.

* ProgressCounter. This is the type which is instantiated by the AddCounter method of LongRunningProcess.

* ProgressCounterDictionary. This is the type of the MyProgressCounters property of LongRunningProcess.

* ProgressForm (internal). This is the form displayed by ResponsiveForm containing the progress bars.

* ProgressControl (internal). This control encapsulates a progress bar and a textual representation of the progress, and is used as a child control of ProgressForm.

As always, the CommonForms.Example project contains some code demonstrating how to use these new features - see the classes TestFormForResponsiveForm, ALongRunningProcess and SubProcess.