unit UnitNotification;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
System.Notification, FMX.Controls.Presentation, FMX.StdCtrls;
type
TForm1 = class(TForm)
NotificationCenter1: TNotificationCenter;
Button1: TButton;
procedure DoNotification(aName, aTitle, aBody: string);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.fmx}
procedure TForm1.DoNotification(aName, aTitle, aBody: string);
var
appNotification: TNotification;
begin
appNotification := NotificationCenter1.CreateNotification;
try
appNotification.Name := aName;
appNotification.Title := aTitle;
appNotification.AlertBody := aBody;
NotificationCenter1.PresentNotification(appNotification);
finally
appNotification.Free;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
DoNotification('Test Name', 'Test Title', 'This is an example');
end;
end.
Subscribe to:
Post Comments (Atom)
zomok E-commerce system plan. Choose your online ordering system. No-risk 30 day free trial. Then USD 9/month. No credit card required.
zomok E-commerce system plan. Choose your online ordering system. No-risk 30 day free trial. Then USD 9/month. No credit card required. h...
-
Grows your business with zomok online ordering platform. Zero commission. Suitable for restaurants, kopitiam, food, groceries, pet supplie...
-
Complete TFTP Server example, using Indy components There are not many good TFTP server examples out there, so I wrote this example of...
No comments:
Post a Comment