Repository navigation
Expand file tree
/
Copy pathUCalcMD5.pas
More file actions
71 lines (60 loc) · 1.68 KB
/
Copy pathUCalcMD5.pas
File metadata and controls
71 lines (60 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
unit UCalcMD5;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls;
type
TFCalcMD5 = class(TForm)
OpenDialog: TOpenDialog;
edtLocalArquivo: TEdit;
SpeedButton1: TSpeedButton;
Label1: TLabel;
Label2: TLabel;
BitBtn1: TBitBtn;
Edit1: TEdit;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure edtLocalArquivoExit(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FCalcMD5: TFCalcMD5;
implementation
uses UFunctions, UPrincipal;
{$R *.dfm}
procedure TFCalcMD5.FormClose(Sender: TObject; var Action: TCloseAction);
begin
TFPrincipal(owner).FCalcMD5 := nil;
TFPrincipal(owner).FCalcMD5.Free;
self.Release;
end;
procedure TFCalcMD5.edtLocalArquivoExit(Sender: TObject);
begin
if not FileExists(edtLocalArquivo.Text) then
begin
ShowMessage('O Diretório Selecionado não existe. Verifique!');
edtLocalArquivo.Text := '';
exit;
end;
//if RightStr(edtLocalArquivo.Text,1) <> '\' then
// edtLocalArquivo.Text := edtLocalArquivo.Text + '\';
end;
procedure TFCalcMD5.SpeedButton1Click(Sender: TObject);
begin
OpenDialog.Title := 'Selecione o Arquivo.';
OpenDialog.InitialDir := 'C:\';
if OpenDialog.Execute then
Begin
edtLocalArquivo.Text := OpenDialog.FileName;
end;
end;
procedure TFCalcMD5.BitBtn1Click(Sender: TObject);
begin
if edtLocalArquivo.Text<> '' then
Edit1.text :=GetMD5File(edtLocalArquivo.Text)
end;
end.