3 // Test program for Magenta Check Disk and Format Disk component
\r
4 // 20th October 2005 - Release 1.0 (C) Magenta Systems Ltd, 2005
\r
6 // Copyright by Angus Robertson, Magenta Systems Ltd, England
\r
7 // delphi@magsys.co.uk, http://www.magsys.co.uk/delphi/
\r
12 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
\r
13 Dialogs, StdCtrls, ExtCtrls, magfmtdisk, FileCtrl, ComCtrls ;
\r
16 TMainForm = class(TForm)
\r
21 DriveBox: TDriveComboBox;
\r
22 OptCorrectErrors: TCheckBox;
\r
23 OptVerbose: TCheckBox;
\r
24 OptCheckDirty: TCheckBox;
\r
25 OptScanDrive: TCheckBox;
\r
26 OptQuickFmt: TCheckBox;
\r
29 ProgressBar: TProgressBar;
\r
30 FileSystem: TComboBox;
\r
33 procedure FormDestroy(Sender: TObject);
\r
34 procedure FormCreate(Sender: TObject);
\r
35 procedure doChkDskClick(Sender: TObject);
\r
36 procedure doExitClick(Sender: TObject);
\r
37 procedure doAbortClick(Sender: TObject);
\r
38 procedure doFrmtDskClick(Sender: TObject);
\r
40 { Private declarations }
\r
41 procedure LogInfo (Info: String) ;
\r
42 procedure ProgressEvent (Percent: integer; var Cancel: boolean) ;
\r
43 procedure InfoEvent (Info: string; var Cancel: boolean) ;
\r
45 { Public declarations }
\r
49 MainForm: TMainForm;
\r
50 MagFmtChkDsk: TMagFmtChkDsk ;
\r
51 CancelFlag: boolean ;
\r
57 procedure TMainForm.FormDestroy(Sender: TObject);
\r
59 FreeAndNil (MagFmtChkDsk) ;
\r
62 procedure TMainForm.FormCreate(Sender: TObject);
\r
64 MagFmtChkDsk := TMagFmtChkDsk.Create (self) ;
\r
65 MagFmtChkDsk.onProgressEvent := ProgressEvent ;
\r
66 MagFmtChkDsk.onInfoEvent := InfoEvent ;
\r
69 procedure TMainForm.LogInfo (Info: String) ;
\r
71 Log.Lines.Add (Info) ;
\r