You've already forked lazarus-ccr
RxFPC:demo for RxPopupNotifier
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6342 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
BIN
components/rx/trunk/demos/RxPopupNotifier/project1.ico
Normal file
BIN
components/rx/trunk/demos/RxPopupNotifier/project1.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
84
components/rx/trunk/demos/RxPopupNotifier/project1.lpi
Normal file
84
components/rx/trunk/demos/RxPopupNotifier/project1.lpi
Normal file
@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<AutoCreateForms Value="False"/>
|
||||
<Title Value="project1"/>
|
||||
<Scaled Value="True"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="0"/>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="3">
|
||||
<Item1>
|
||||
<PackageName Value="rxnew"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="rx"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item3>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<Target>
|
||||
<Filename Value="project1"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
21
components/rx/trunk/demos/RxPopupNotifier/project1.lpr
Normal file
21
components/rx/trunk/demos/RxPopupNotifier/project1.lpr
Normal file
@ -0,0 +1,21 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, rx, rxnew, Unit1;
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Scaled:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
63
components/rx/trunk/demos/RxPopupNotifier/unit1.lfm
Normal file
63
components/rx/trunk/demos/RxPopupNotifier/unit1.lfm
Normal file
@ -0,0 +1,63 @@
|
||||
object Form1: TForm1
|
||||
Left = 688
|
||||
Height = 381
|
||||
Top = 449
|
||||
Width = 577
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 381
|
||||
ClientWidth = 577
|
||||
LCLVersion = '1.9.0.0'
|
||||
object Button4: TButton
|
||||
Left = 224
|
||||
Height = 36
|
||||
Top = 48
|
||||
Width = 113
|
||||
AutoSize = True
|
||||
Caption = 'Static message'
|
||||
OnClick = Button4Click
|
||||
TabOrder = 0
|
||||
end
|
||||
object Button5: TButton
|
||||
Left = 216
|
||||
Height = 36
|
||||
Top = 96
|
||||
Width = 127
|
||||
AutoSize = True
|
||||
Caption = 'Dinamic message'
|
||||
OnClick = Button5Click
|
||||
TabOrder = 1
|
||||
end
|
||||
object Button6: TButton
|
||||
Left = 176
|
||||
Height = 36
|
||||
Top = 152
|
||||
Width = 195
|
||||
AutoSize = True
|
||||
Caption = 'Message without auto close'
|
||||
OnClick = Button6Click
|
||||
TabOrder = 2
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 384
|
||||
Height = 20
|
||||
Top = 112
|
||||
Width = 34
|
||||
Caption = 'Color'
|
||||
ParentColor = False
|
||||
end
|
||||
object ColorBox1: TColorBox
|
||||
Left = 424
|
||||
Height = 36
|
||||
Top = 96
|
||||
Width = 100
|
||||
Selected = clYellow
|
||||
ItemHeight = 0
|
||||
TabOrder = 3
|
||||
end
|
||||
object RxPopupNotifier1: TRxPopupNotifier
|
||||
Items = <>
|
||||
OnNotifiClick = RxPopupNotifier1NotifiClick
|
||||
Left = 56
|
||||
Top = 38
|
||||
end
|
||||
end
|
80
components/rx/trunk/demos/RxPopupNotifier/unit1.pas
Normal file
80
components/rx/trunk/demos/RxPopupNotifier/unit1.pas
Normal file
@ -0,0 +1,80 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
PopupNotifier, ExtCtrls, ColorBox, MRUList, rxPopupNotifier, rxtooledit, DB;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
Button4: TButton;
|
||||
Button5: TButton;
|
||||
Button6: TButton;
|
||||
ColorBox1: TColorBox;
|
||||
Label1: TLabel;
|
||||
RxPopupNotifier1: TRxPopupNotifier;
|
||||
procedure Button4Click(Sender: TObject);
|
||||
procedure Button5Click(Sender: TObject);
|
||||
procedure Button6Click(Sender: TObject);
|
||||
procedure RxPopupNotifier1NotifiClick(Sender: TRxPopupNotifier;
|
||||
AItem: TRxPopupNotifierItem);
|
||||
private
|
||||
FRClose: TRxPopupNotifierItem;
|
||||
FR: TRxPopupNotifierItem;
|
||||
FCurID:integer;
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.Button4Click(Sender: TObject);
|
||||
begin
|
||||
if Assigned(FR) then
|
||||
FR.Active:=true
|
||||
else
|
||||
FR:=RxPopupNotifier1.AddNotifyItem('Information', 'Static text information');
|
||||
end;
|
||||
|
||||
procedure TForm1.Button5Click(Sender: TObject);
|
||||
var
|
||||
R1: TRxPopupNotifierItem;
|
||||
begin
|
||||
Inc(FCurID);
|
||||
R1:=RxPopupNotifier1.AddNotifyItem('Warning', 'Error message № ' + IntToStr(FCurID));
|
||||
R1.ShowCloseTimer:=true;
|
||||
R1.Color:=ColorBox1.Selected;
|
||||
end;
|
||||
|
||||
procedure TForm1.Button6Click(Sender: TObject);
|
||||
begin
|
||||
if Assigned(FRClose) then
|
||||
FRClose.Active:=true
|
||||
else
|
||||
begin
|
||||
FRClose:=RxPopupNotifier1.AddNotifyItem('Information', 'Static text information without close');
|
||||
FRClose.ShowCloseTimer:=false;
|
||||
end
|
||||
end;
|
||||
|
||||
procedure TForm1.RxPopupNotifier1NotifiClick(Sender: TRxPopupNotifier;
|
||||
AItem: TRxPopupNotifierItem);
|
||||
begin
|
||||
ShowMessage('Click');
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user