home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip: Shareware for Win 95
/
Chip-Shareware-Win95.bin
/
ostatni
/
delphi
/
ruzne
/
rzcomps.exe
/
DEMO
/
PROGFRM.PA_
/
PROGFRM.PA
Wrap
Text File
|
1996-10-18
|
2KB
|
87 lines
unit Progfrm;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, RzPrgres, RzTrkBar, StdCtrls, RzSpnEdt, RzLabel;
type
TFrmProgress = class(TForm)
Pbr1: TRzProgressBar;
Pbr2: TRzProgressBar;
Pbr3: TRzProgressBar;
Pbr4: TRzProgressBar;
TrkPercent: TRzTrackBar;
BtnOK: TButton;
Pbr5: TRzProgressBar;
SpnPartsComp: TRzSpinEdit;
SpnTotal: TRzSpinEdit;
Label1: TLabel;
Label2: TLabel;
Pbr6: TRzProgressBar;
RzLabel1: TRzLabel;
RzLabel2: TRzLabel;
RzLabel3: TRzLabel;
procedure TrkPercentChange(Sender: TObject);
procedure SpnPartsCompChange(Sender: TObject);
procedure SpnTotalChange(Sender: TObject);
procedure SpnPartsCompChanging(Sender: TObject;
var AllowChange: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FrmProgress: TFrmProgress;
implementation
{$R *.DFM}
procedure TFrmProgress.TrkPercentChange(Sender: TObject);
begin
SpnPartsComp.Value := 0;
SpnTotal.Value := 0;
Pbr1.Percent := TrkPercent.Position;
Pbr2.Percent := TrkPercent.Position;
Pbr3.Percent := TrkPercent.Position;
Pbr4.Percent := TrkPercent.Position;
Pbr5.Percent := TrkPercent.Position;
Pbr6.Percent := TrkPercent.Position;
end;
procedure TFrmProgress.SpnPartsCompChange(Sender: TObject);
begin
Pbr1.PartsComplete := SpnPartsComp.IntValue;
Pbr2.PartsComplete := SpnPartsComp.IntValue;
Pbr3.PartsComplete := SpnPartsComp.IntValue;
Pbr4.PartsComplete := SpnPartsComp.IntValue;
Pbr5.PartsComplete := SpnPartsComp.IntValue;
Pbr6.PartsComplete := SpnPartsComp.IntValue;
end;
procedure TFrmProgress.SpnTotalChange(Sender: TObject);
begin
SpnPartsComp.Value := 0;
SpnPartsCompChange( Self );
Pbr1.TotalParts := SpnTotal.IntValue;
Pbr2.TotalParts := SpnTotal.IntValue;
Pbr3.TotalParts := SpnTotal.IntValue;
Pbr4.TotalParts := SpnTotal.IntValue;
Pbr5.TotalParts := SpnTotal.IntValue;
Pbr6.TotalParts := SpnTotal.IntValue;
end;
procedure TFrmProgress.SpnPartsCompChanging(Sender: TObject;
var AllowChange: Boolean);
begin
if SpnTotal.IntValue = 0 then
AllowChange := False;
end;
end.