Public Member Functions | |
| ProgressDialog () | |
| Creates a new instance. | |
| void | StartService (ServiceController service) |
| Monitors the start of a service. | |
| void | StopService (ServiceController service) |
| Monitors the stop of a service. | |
| void | Cancel () |
| Closes the dialog and stops the monitor thread when running. | |
Protected Member Functions | |
| override void | Dispose (bool disposing) |
| Clean up any resources being used. | |
Private Member Functions | |
| delegate void | SetTextCallback (string text) |
| This delegate enables asynchronous calls for setting the text property of the labe1 TextBox control. | |
| delegate void | CloseDialogCallback () |
| This delegate enables asynchronous calls for Closing the dialog. | |
| void | DoStartService (object serviceObject) |
| Thread Start method. This method delegates to DoService(ServiceController service, bool start). | |
| void | DoStopService (object serviceObject) |
| Thread Start method. This method delegates to DoService(ServiceController service, bool start). | |
| void | DoService (ServiceController service, bool start) |
| Checks the status of a service and closes the dialog when the final status has been reached. | |
| void | button1_Click (object sender, EventArgs e) |
| Event handler for the cancel button. | |
| void | SetLabelText (string text) |
| Sets the Text of this.label1. | |
| void | CloseDialog () |
| Closes the dialog. | |
| void | InitializeComponent () |
| Required method for Designer support - do not modify the contents of this method with the code editor. | |
Private Attributes | |
| bool | isRunning = false |
| Thread synchronization object. true when the service is still being starting/stopping. | |
| ResourceManager | messages = null |
| The private System.Resources.ResourceManager used for internationalization. | |
| System.ComponentModel.IContainer | components = null |
| Required designer variable. | |
StartService(ServiceController)
| ServicesCtl.ProgressDialog.ProgressDialog | ( | ) |
Creates a new instance.
Initialize the Form and creates a ResourceManager.
| delegate void ServicesCtl.ProgressDialog.SetTextCallback | ( | string | text | ) | [private] |
This delegate enables asynchronous calls for setting the text property of the labe1 TextBox control.
| text | The already translated text |
| delegate void ServicesCtl.ProgressDialog.CloseDialogCallback | ( | ) | [private] |
This delegate enables asynchronous calls for Closing the dialog.
| void ServicesCtl.ProgressDialog.StartService | ( | ServiceController | service | ) |
Monitors the start of a service.
| service | The service to monitor |
| void ServicesCtl.ProgressDialog.DoStartService | ( | object | serviceObject | ) | [private] |
Thread Start method. This method delegates to DoService(ServiceController service, bool start).
| serviceObject | The service to monitor |
| void ServicesCtl.ProgressDialog.StopService | ( | ServiceController | service | ) |
Monitors the stop of a service.
| service | The service to monitor |
| void ServicesCtl.ProgressDialog.DoStopService | ( | object | serviceObject | ) | [private] |
Thread Start method. This method delegates to DoService(ServiceController service, bool start).
| serviceObject | The service to monitor |
| void ServicesCtl.ProgressDialog.DoService | ( | ServiceController | service, | |
| bool | start | |||
| ) | [private] |
Checks the status of a service and closes the dialog when the final status has been reached.
| service | The service to monitor | |
| start | true when a service start should be monitored, false when a service stop should be monitored |
| void ServicesCtl.ProgressDialog.Cancel | ( | ) |
Closes the dialog and stops the monitor thread when running.
| void ServicesCtl.ProgressDialog.button1_Click | ( | object | sender, | |
| EventArgs | e | |||
| ) | [private] |
Event handler for the cancel button.
| sender | sender | |
| e | EventArgs |
| void ServicesCtl.ProgressDialog.SetLabelText | ( | string | text | ) | [private] |
Sets the Text of this.label1.
| text | The text to set |
| void ServicesCtl.ProgressDialog.CloseDialog | ( | ) | [private] |
Closes the dialog.
This method handles calls from the UI and non-UI Threads.
| override void ServicesCtl.ProgressDialog.Dispose | ( | bool | disposing | ) | [protected] |
Clean up any resources being used.
| disposing | true if managed resources should be disposed; otherwise, false. |
| void ServicesCtl.ProgressDialog.InitializeComponent | ( | ) | [private] |
Required method for Designer support - do not modify the contents of this method with the code editor.
bool ServicesCtl.ProgressDialog.isRunning = false [private] |
Thread synchronization object. true when the service is still being starting/stopping.
ResourceManager ServicesCtl.ProgressDialog.messages = null [private] |
The private System.Resources.ResourceManager used for internationalization.
System.ComponentModel.IContainer ServicesCtl.ProgressDialog.components = null [private] |
Required designer variable.
1.5.2