90 lines
1.8 KiB
ObjectPascal
90 lines
1.8 KiB
ObjectPascal
unit uShowInfo;
|
|
|
|
interface
|
|
|
|
uses
|
|
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
|
|
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.ImgList,
|
|
FMX.Objects, System.ImageList;
|
|
|
|
type
|
|
TFrmShowInfo = class(TForm)
|
|
Glyph22: TGlyph;
|
|
TxtInfo: TText;
|
|
Text3: TText;
|
|
ImageList1: TImageList;
|
|
Rectangle8: TRectangle;
|
|
Rectangle4: TRectangle;
|
|
procedure Text2Click(Sender: TObject);
|
|
procedure Text1Click(Sender: TObject);
|
|
private
|
|
{ Private declarations }
|
|
public
|
|
{ Public declarations }
|
|
end;
|
|
|
|
var
|
|
FrmShowInfo: TFrmShowInfo;
|
|
function ShowInfoOKCancel(sInfo:string):boolean;
|
|
function ShowError(sInfo:string):boolean;
|
|
function ShowInfoOK(sInfo:string):boolean;
|
|
implementation
|
|
|
|
{$R *.fmx}
|
|
|
|
function ShowInfoOKCancel(sInfo:string):boolean;
|
|
begin
|
|
Result:=false;
|
|
with TFrmShowInfo.Create(nil) do
|
|
begin
|
|
try
|
|
TxtInfo.Text:=sInfo;
|
|
Result:=ShowModal=MrOk;
|
|
finally
|
|
Free;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
function ShowError(sInfo:string):boolean;
|
|
begin
|
|
with TFrmShowInfo.Create(nil) do
|
|
begin
|
|
try
|
|
Text3.Text:='åeÕ`';
|
|
TxtInfo.Text:=sInfo;
|
|
Glyph22.ImageIndex:=1;
|
|
Rectangle4.Visible:=false;
|
|
Result:=ShowModal=MrOk;
|
|
finally
|
|
Free;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
function ShowInfoOK(sInfo:string):boolean;
|
|
begin
|
|
with TFrmShowInfo.Create(nil) do
|
|
begin
|
|
try
|
|
TxtInfo.Text:=sInfo;
|
|
Rectangle4.Visible:=false;
|
|
Result:=ShowModal=MrOk;
|
|
finally
|
|
Free;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
procedure TFrmShowInfo.Text1Click(Sender: TObject);
|
|
begin
|
|
ModalResult:=mrOK;
|
|
end;
|
|
|
|
procedure TFrmShowInfo.Text2Click(Sender: TObject);
|
|
begin
|
|
ModalResult:=mrCancel;
|
|
end;
|
|
|
|
end.
|