-
Notifications
You must be signed in to change notification settings - Fork 2
/
MaskAsk.pas
executable file
·88 lines (73 loc) · 1.8 KB
/
MaskAsk.pas
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
unit MaskAsk;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TMAskForm = class(TForm)
MaskEdit: TEdit;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
Button1: TButton;
Button2: TButton;
Label1: TLabel;
RadioButton4: TRadioButton;
RadioButton5: TRadioButton;
NoMoreAskBox: TCheckBox;
procedure RadioButton1Enter(Sender: TObject);
procedure RadioButton2Enter(Sender: TObject);
procedure RadioButton3Enter(Sender: TObject);
procedure RadioButton4Enter(Sender: TObject);
procedure RadioButton5Enter(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
MAskForm: TMAskForm;
function AskMask : string;
implementation uses main;
function AskMask : string;
begin
AskMask := '';
with TMAskForm.Create(Application) do
try
if ShowModal = mrOK then
begin
AskMask := MaskEdit.Text;
AskFileMask := not NoMoreAskBox.Checked;
FileNameMask := MaskEdit.Text;
end else AskMask := '';
finally
Free;
end;
end;
{$R *.DFM}
procedure TMAskForm.RadioButton1Enter(Sender: TObject);
begin
MaskEdit.Text := FileNameMask;
end;
procedure TMAskForm.RadioButton2Enter(Sender: TObject);
begin
MaskEdit.Text := '%A% - %T%';
end;
procedure TMAskForm.RadioButton3Enter(Sender: TObject);
begin
MaskEdit.Text := '%TR,R,2,0%. %T%';
end;
procedure TMAskForm.RadioButton4Enter(Sender: TObject);
begin
MaskEdit.Text := '%TR,R,2,0% - %T%';
end;
procedure TMAskForm.RadioButton5Enter(Sender: TObject);
begin
MaskEdit.Text := '(%A%-%ALB%(%Y%)-%T%';
end;
procedure TMAskForm.FormCreate(Sender: TObject);
begin
NoMoreAskBox.Checked := not AskFileMask;
end;
end.