procedure TpsiProgressBar.SetNumDone(Value: Integer);
begin
if Value < 0 then
Value := 0;
if Value > 100 then
Value := 100;
FNumDone := Value;
if NumTodo > 0 then
Progress := Round((FNumDone / NumTodo) * 100);
end;
procedure TpsiProgressBar.SetNumTodo(Value: Integer);
begin
if Value < 0 then
Value := 0;
if Value > 100 then
Value := 100;
FNumTodo := Value;
if FNumTodo > 0 then
Progress := Round((NumDone / FNumTodo) * 100);
end;
procedure TpsiProgressBar.SetProgress(Value: Integer);
begin
LastProgress := Progress;
if Value < 0 then
Value := 0;
if Value > 100 then
Value := 100;
FProgress := Value;
if (GetParentForm(Self) <> nil) and (Visible = True) then
begin
PaintCaption;
PaintProgressBar;
end;
end;
procedure TpsiProgressBar.SetColor3DHighlight(Value: TColor);
begin
FColor3DHighlight := Value;
if Visible = True then
Self.Repaint;
end;
procedure TpsiProgressBar.SetColor3DShadow(Value: TColor);
begin
FColor3DShadow := Value;
if Visible = True then
Self.Repaint;
end;
procedure TpsiProgressBar.SetColorBack(Value: TColor);
begin
FColorBack := Value;
if Visible = True then
Self.Repaint;
end;
procedure TpsiProgressBar.SetColorBar(Value: TColor);
begin
FColorBar := Value;
if Visible = True then
Self.Repaint;
end;
procedure TpsiProgressBar.SetFontCaption(Value: TFont);
begin
with FFontCaptiondo
begin
Color := Value.Color;
Height := Value.Height;
Name := Value.Name;
Pitch := Value.Pitch;
Size := Value.Size;
Style := Value.Style;
end;
if Visible = True then
self.refresh;
end;