| Class TMainForm (unit MainFrm) |
TForm
This project shows the use of the TProgressor and TProgressObserver classes. For more details about how to use these classes and examples look through the unit DemoOps and this unit MainFrm.
| Constructors |
| Functions |
procedure AbortBtnClick(Sender: TObject);
procedure CoarseObserverDescriptionChange(Sender: TObject);
procedure CoarseObserverFinish(Sender: TObject);
procedure CoarseObserverProgressChange(Sender: TObject);
procedure CoarseObserverStart(Sender: TObject);
procedure FineObserverProgressChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure RunBtnClick(Sender: TObject);
procedure ShowHint(Sender: TObject);| Properties |
| Events |
| Variables |
AbortBtn : TSpeedButton;
CoarseObserver : TProgressObserver;
FineLabel : TLabel;
FineObserver : TProgressObserver;
Gauge : TGauge;
ProgressLabel : TLabel;
ProgressPanel : TPanel;
RunBtn : TSpeedButton;
StatusLabel : TLabel;
StatusLine : TPanel;
StatusPanel : TPanel;
ToolBar : TPanel;| Constructors |
| Functions |
procedure AbortBtnClick(Sender: TObject);make sure to return to normal state again
procedure CoarseObserverDescriptionChange(Sender: TObject);
procedure CoarseObserverFinish(Sender: TObject);Here we use one of the Observers to read the (changed) progress which wrap the TProgressor's Progress property. Also demonstrate the Accuracy property of the observers, the gauge is updated with accuracy of 10 percent
procedure CoarseObserverProgressChange(Sender: TObject);Use the class function TProgressor.Instance to read the (changed) description We could also have called one of the observer's Description properties which simply wrap the TProgressor's description property
procedure CoarseObserverStart(Sender: TObject);Simply make the complete panel invisible when progress has finished. The align properties of the panels will take care of the rest
procedure FineObserverProgressChange(Sender: TObject);
procedure FormCreate(Sender: TObject);operation is aborted. The operations check the state of Aborted The progressor sets Aborted to False the first time StartProgress is called
procedure RunBtnClick(Sender: TObject);Simply make the complete panel visible when progress starts. The align properties of the panels will take care of the rest
procedure ShowHint(Sender: TObject);Show hint in status line
| Properties |
| Events |
| Variables |
AbortBtn : TSpeedButton;
CoarseObserver : TProgressObserver;
FineLabel : TLabel;
FineObserver : TProgressObserver;
Gauge : TGauge;
ProgressLabel : TLabel;
ProgressPanel : TPanel;
RunBtn : TSpeedButton;
StatusLabel : TLabel;
StatusLine : TPanel;
StatusPanel : TPanel;
ToolBar : TPanel;