FDXPProgress.pas 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. unit FDXPProgress;
  2. interface
  3. uses
  4. Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  5. Dialogs, StdCtrls, ExtCtrls;
  6. type
  7. TDXPProgress = class(TForm)
  8. Panel1: TPanel;
  9. BUOk: TButton;
  10. Label1: TLabel;
  11. STProject: TStaticText;
  12. STStatus: TStaticText;
  13. Panel2: TPanel;
  14. Panel3: TPanel;
  15. Panel4: TPanel;
  16. Panel5: TPanel;
  17. LAErrors: TLabel;
  18. LAWarnings: TLabel;
  19. LAHints: TLabel;
  20. LANotes: TLabel;
  21. BUAbort: TButton;
  22. Panel6: TPanel;
  23. LATime: TLabel;
  24. Timer: TTimer;
  25. procedure FormCreate(Sender: TObject);
  26. procedure TimerTimer(Sender: TObject);
  27. procedure BUOkClick(Sender: TObject);
  28. private
  29. { Déclarations privées }
  30. FStartTime : TDateTime;
  31. public
  32. { Déclarations publiques }
  33. procedure SetProject(const projectName : String);
  34. procedure SetStatus(const status : String);
  35. procedure SetStat(const errors, warnings, hints, notes : Integer);
  36. end;
  37. implementation
  38. {$R *.dfm}
  39. procedure TDXPProgress.SetProject(const projectName : String);
  40. begin
  41. STProject.Caption:=' Project: '+projectName;
  42. end;
  43. procedure TDXPProgress.SetStatus(const status : String);
  44. begin
  45. STStatus.Caption:=status;
  46. end;
  47. procedure TDXPProgress.SetStat(const errors, warnings, hints, notes : Integer);
  48. begin
  49. LAErrors.Caption:=IntToStr(errors)+' ';
  50. LAWarnings.Caption:=IntToStr(warnings)+' ';
  51. LAHints.Caption:=IntToStr(hints)+' ';
  52. LANotes.Caption:=IntToStr(notes)+' ';
  53. end;
  54. procedure TDXPProgress.FormCreate(Sender: TObject);
  55. begin
  56. FStartTime:=Now;
  57. TimerTimer(Self);
  58. end;
  59. procedure TDXPProgress.TimerTimer(Sender: TObject);
  60. begin
  61. LATime.Caption:=FormatDateTime('hh:nn:ss ', Now-FStartTime);
  62. end;
  63. procedure TDXPProgress.BUOkClick(Sender: TObject);
  64. begin
  65. Close;
  66. end;
  67. end.