Стартовый пул
This commit is contained in:
BIN
RXLib/demos/RxPopupNotifier/project1.ico
Normal file
BIN
RXLib/demos/RxPopupNotifier/project1.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
84
RXLib/demos/RxPopupNotifier/project1.lpi
Normal file
84
RXLib/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="RxPopupNotifier demo"/>
|
||||
<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>
|
22
RXLib/demos/RxPopupNotifier/project1.lpr
Normal file
22
RXLib/demos/RxPopupNotifier/project1.lpr
Normal file
@@ -0,0 +1,22 @@
|
||||
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
|
||||
Application.Title:='RxPopupNotifier demo';
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Scaled:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
138
RXLib/demos/RxPopupNotifier/unit1.lfm
Normal file
138
RXLib/demos/RxPopupNotifier/unit1.lfm
Normal file
@@ -0,0 +1,138 @@
|
||||
object Form1: TForm1
|
||||
Left = 688
|
||||
Height = 381
|
||||
Top = 449
|
||||
Width = 577
|
||||
Caption = 'RxPopupNotifier demo'
|
||||
ClientHeight = 381
|
||||
ClientWidth = 577
|
||||
LCLVersion = '1.9.0.0'
|
||||
object Button4: TButton
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
AnchorSideTop.Control = Button1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 232
|
||||
Height = 36
|
||||
Top = 48
|
||||
Width = 113
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Static message'
|
||||
OnClick = Button4Click
|
||||
TabOrder = 0
|
||||
end
|
||||
object Button5: TButton
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
AnchorSideTop.Control = Button4
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 225
|
||||
Height = 36
|
||||
Top = 90
|
||||
Width = 127
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Dinamic message'
|
||||
OnClick = Button5Click
|
||||
TabOrder = 1
|
||||
end
|
||||
object Button6: TButton
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
AnchorSideTop.Control = ColorBox1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 191
|
||||
Height = 36
|
||||
Top = 158
|
||||
Width = 195
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Message without auto close'
|
||||
OnClick = Button6Click
|
||||
TabOrder = 2
|
||||
end
|
||||
object Label1: TLabel
|
||||
AnchorSideTop.Control = Button4
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 416
|
||||
Height = 20
|
||||
Top = 90
|
||||
Width = 147
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Dinamic message color'
|
||||
ParentColor = False
|
||||
end
|
||||
object ColorBox1: TColorBox
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideTop.Control = Label1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 422
|
||||
Height = 36
|
||||
Top = 116
|
||||
Width = 149
|
||||
Selected = clYellow
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
ItemHeight = 0
|
||||
TabOrder = 3
|
||||
end
|
||||
object RadioGroup1: TRadioGroup
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 6
|
||||
Height = 117
|
||||
Top = 6
|
||||
Width = 140
|
||||
AutoFill = True
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Message positon'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 96
|
||||
ClientWidth = 138
|
||||
ItemIndex = 3
|
||||
Items.Strings = (
|
||||
'rpcTopLeft'
|
||||
'rpcTopRight'
|
||||
'rpcBootomLeft'
|
||||
'rpcBottomRight'
|
||||
)
|
||||
OnClick = RadioGroup1Click
|
||||
TabOrder = 4
|
||||
end
|
||||
object Button1: TButton
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 228
|
||||
Height = 36
|
||||
Top = 6
|
||||
Width = 121
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Design message'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 5
|
||||
end
|
||||
object RxPopupNotifier1: TRxPopupNotifier
|
||||
Items = <
|
||||
item
|
||||
Active = False
|
||||
Color = clAqua
|
||||
Caption = 'Design message'
|
||||
Message = 'Design time message'
|
||||
end>
|
||||
OnNotifiClick = RxPopupNotifier1NotifiClick
|
||||
Left = 176
|
||||
Top = 16
|
||||
end
|
||||
end
|
101
RXLib/demos/RxPopupNotifier/unit1.pas
Normal file
101
RXLib/demos/RxPopupNotifier/unit1.pas
Normal file
@@ -0,0 +1,101 @@
|
||||
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)
|
||||
Button1: TButton;
|
||||
Button4: TButton;
|
||||
Button5: TButton;
|
||||
Button6: TButton;
|
||||
ColorBox1: TColorBox;
|
||||
Label1: TLabel;
|
||||
RadioGroup1: TRadioGroup;
|
||||
RxPopupNotifier1: TRxPopupNotifier;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button4Click(Sender: TObject);
|
||||
procedure Button5Click(Sender: TObject);
|
||||
procedure Button6Click(Sender: TObject);
|
||||
procedure RadioGroup1Click(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.Button1Click(Sender: TObject);
|
||||
var
|
||||
R: TRxPopupNotifierItem;
|
||||
begin
|
||||
if RxPopupNotifier1.Items.Count>0 then
|
||||
begin
|
||||
R:=RxPopupNotifier1.Items[0];
|
||||
R.Active:=true;
|
||||
|
||||
end;
|
||||
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.RadioGroup1Click(Sender: TObject);
|
||||
begin
|
||||
RxPopupNotifier1.MessageCorner:=TRxPopupNotifierCorner(RadioGroup1.ItemIndex);
|
||||
end;
|
||||
|
||||
procedure TForm1.RxPopupNotifier1NotifiClick(Sender: TRxPopupNotifier;
|
||||
AItem: TRxPopupNotifierItem);
|
||||
begin
|
||||
ShowMessage('Click');
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user