diff --git a/components/rx/trunk/demos/RxPopupNotifier/project1.ico b/components/rx/trunk/demos/RxPopupNotifier/project1.ico new file mode 100644 index 000000000..0341321b5 Binary files /dev/null and b/components/rx/trunk/demos/RxPopupNotifier/project1.ico differ diff --git a/components/rx/trunk/demos/RxPopupNotifier/project1.lpi b/components/rx/trunk/demos/RxPopupNotifier/project1.lpi new file mode 100644 index 000000000..bd9708dc3 --- /dev/null +++ b/components/rx/trunk/demos/RxPopupNotifier/project1.lpi @@ -0,0 +1,84 @@ + + + + + + + + + + <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> diff --git a/components/rx/trunk/demos/RxPopupNotifier/project1.lpr b/components/rx/trunk/demos/RxPopupNotifier/project1.lpr new file mode 100644 index 000000000..6049b8408 --- /dev/null +++ b/components/rx/trunk/demos/RxPopupNotifier/project1.lpr @@ -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. + diff --git a/components/rx/trunk/demos/RxPopupNotifier/unit1.lfm b/components/rx/trunk/demos/RxPopupNotifier/unit1.lfm new file mode 100644 index 000000000..95e511da5 --- /dev/null +++ b/components/rx/trunk/demos/RxPopupNotifier/unit1.lfm @@ -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 diff --git a/components/rx/trunk/demos/RxPopupNotifier/unit1.pas b/components/rx/trunk/demos/RxPopupNotifier/unit1.pas new file mode 100644 index 000000000..d8dd2f972 --- /dev/null +++ b/components/rx/trunk/demos/RxPopupNotifier/unit1.pas @@ -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. +