-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathWP.GitHub.CustomMessage.pas
56 lines (44 loc) · 1.25 KB
/
WP.GitHub.CustomMessage.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
{ ***************************************************}
{ Auhtor: Ali Dehbansiahkarbon([email protected]) }
{ GitHub: https://github.com/AliDehbansiahkarbon }
{ ***************************************************}
unit WP.GitHub.CustomMessage;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls;
type
TFrm_CustomMSG = class(TForm)
Btn_No: TButton;
Btn_Yes: TButton;
lbl_Msg: TLabel;
Panel1: TPanel;
Panel2: TPanel;
procedure Btn_YesClick(Sender: TObject);
procedure Btn_NoClick(Sender: TObject);
private
{ Private declarations }
public
constructor CreateMessage(const AMessage: string; const ACaption: string); reintroduce;
{ Public declarations }
end;
var
Frm_CustomMSG: TFrm_CustomMSG;
implementation
{$R *.dfm}
{ TForm1 }
procedure TFrm_CustomMSG.Btn_NoClick(Sender: TObject);
begin
ModalResult := mrCancel;
end;
procedure TFrm_CustomMSG.Btn_YesClick(Sender: TObject);
begin
ModalResult := mrYes;
end;
constructor TFrm_CustomMSG.CreateMessage(const AMessage, ACaption: string);
begin
inherited Create(nil);
Caption := ACaption;
lbl_Msg.Caption := AMessage;
end;
end.