Subversion Repositories delphiutils

Compare Revisions

No changes between revisions

Regard whitespace Rev 85 → Rev 84

/trunk/FileReadChecker/FileReadChecker_Icon.ico
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/trunk/FileReadChecker/FileReadChecker.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/FileReadChecker/FileReadChecker.res
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/FileReadChecker/FileReadCheckerMain.dfm
13,7 → 13,6
OldCreateOrder = False
Position = poScreenCenter
OnClose = FormClose
OnCreate = FormCreate
DesignSize = (
756
472)
47,6 → 46,7
Default = True
TabOrder = 0
OnClick = Button1Click
ExplicitTop = 422
end
object Edit1: TEdit
Left = 16
56,9 → 56,10
Anchors = [akLeft, akTop, akRight]
TabOrder = 1
Text = 'C:\'
ExplicitWidth = 682
end
object Memo1: TMemo
Left = 8
Left = 16
Top = 64
Width = 722
Height = 353
66,6 → 67,8
ReadOnly = True
ScrollBars = ssBoth
TabOrder = 2
ExplicitWidth = 682
ExplicitHeight = 352
end
object ProgressBar1: TProgressBar
Left = 201
74,5 → 77,7
Height = 17
Anchors = [akLeft, akRight, akBottom]
TabOrder = 3
ExplicitTop = 422
ExplicitWidth = 497
end
end
/trunk/FileReadChecker/FileReadCheckerMain.pas
16,7 → 16,6
ProgressBar1: TProgressBar;
procedure Button1Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
private
procedure FindFiles(FilesList: TStrings; StartDir, FileMask: string; errorSL: TStrings=nil);
procedure EnableDisableControls(enabled: boolean);
46,10 → 45,6
begin
Application.ProcessMessages;
if Application.Terminated then Abort;
 
if FilesList.Count = FilesList.Capacity - 1 then
FilesList.Capacity := FilesList.Capacity + 1000;
 
FilesList.Add(StartDir + SR.Name);
IsFound := FindNext(SR) = 0;
end;
122,7 → 117,6
cnt := 0;
sl := TStringList.Create;
try
sl.Sorted := false;
sl.BeginUpdate;
Label2.Caption := 'Scan folders ...';
143,9 → 137,7
inc(cnt);
end;
 
QueryPerformanceCounter(c2);
elapsedSecs := Ceil((c2-c1)/f);
Label2.Caption := MinimizeName(Format('[%.2d:%.2d:%.2d] %s', [elapsedSecs div 3600, elapsedSecs mod 3600 div 60, elapsedSecs mod 3600 mod 60, fil]), Label2.Canvas, Label2.Width);
Label2.Caption := MinimizeName(fil, Label2.Canvas, Label2.Width);
 
Application.ProcessMessages;
if Application.Terminated then Abort;
160,7 → 152,7
QueryPerformanceCounter(c2);
elapsedSecs := Ceil((c2-c1)/f);
 
ShowMessageFmt('Finished. Found %d error(s). Elapsed time: %.2d:%.2d:%.2d', [cnt, elapsedSecs div 3600, elapsedSecs mod 3600 div 60, elapsedSecs mod 3600 mod 60]);
ShowMessageFmt('Finished. Found %d error(s). Time: %.2d:%.2d:%.2d', [cnt, elapsedSecs div 3600, elapsedSecs mod 3600 div 60, elapsedSecs mod 3600 mod 60]);
end;
finally
EnableDisableControls(true);
172,23 → 164,12
Application.Terminate;
end;
 
procedure TForm1.FormCreate(Sender: TObject);
begin
DoubleBuffered := true;
 
{$IFDEF UNICODE}
Caption := Caption + ' [Unicode]';
{$ELSE}
Caption := Caption + ' [ANSI]';
{$ENDIF}
end;
 
procedure TForm1.EnableDisableControls(enabled: boolean);
begin
Button1.Enabled := enabled;
Label1.Enabled := enabled;
Edit1.Enabled := enabled;
// Memo1.Enabled := enabled; // is already readonly by default
Memo1.Enabled := enabled;
end;
 
end.