RxFPC: add demo for RxSecretPanel

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6421 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2018-05-16 11:29:59 +00:00
parent 613c96821c
commit 05a358bfd9
12 changed files with 2535 additions and 60 deletions

View File

@@ -12,10 +12,10 @@ object Form1: TForm1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Button1
AnchorSideTop.Side = asrBottom
Left = 232
Height = 36
Top = 48
Width = 113
Left = 235
Height = 23
Top = 35
Width = 106
AutoSize = True
BorderSpacing.Top = 6
Caption = 'Static message'
@@ -27,10 +27,10 @@ object Form1: TForm1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Button4
AnchorSideTop.Side = asrBottom
Left = 225
Height = 36
Top = 90
Width = 127
Left = 229
Height = 23
Top = 64
Width = 118
AutoSize = True
BorderSpacing.Top = 6
Caption = 'Dinamic message'
@@ -42,10 +42,10 @@ object Form1: TForm1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = ColorBox1
AnchorSideTop.Side = asrBottom
Left = 191
Height = 36
Top = 158
Width = 195
Left = 203
Height = 23
Top = 113
Width = 171
AutoSize = True
BorderSpacing.Top = 6
Caption = 'Message without auto close'
@@ -56,9 +56,9 @@ object Form1: TForm1
AnchorSideTop.Control = Button4
AnchorSideTop.Side = asrBottom
Left = 416
Height = 20
Top = 90
Width = 147
Height = 13
Top = 64
Width = 120
BorderSpacing.Around = 6
Caption = 'Dinamic message color'
ParentColor = False
@@ -70,22 +70,22 @@ object Form1: TForm1
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 422
Height = 36
Top = 116
Height = 24
Top = 83
Width = 149
Selected = clYellow
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
ItemHeight = 0
ItemHeight = 20
TabOrder = 3
end
object RadioGroup1: TRadioGroup
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
Left = 6
Height = 117
Height = 86
Top = 6
Width = 140
Width = 116
AutoFill = True
AutoSize = True
BorderSpacing.Around = 6
@@ -97,8 +97,8 @@ object Form1: TForm1
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 96
ClientWidth = 138
ClientHeight = 68
ClientWidth = 112
ItemIndex = 3
Items.Strings = (
'rpcTopLeft'
@@ -113,10 +113,10 @@ object Form1: TForm1
AnchorSideLeft.Control = Owner
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Owner
Left = 228
Height = 36
Left = 232
Height = 23
Top = 6
Width = 121
Width = 112
AutoSize = True
BorderSpacing.Top = 6
Caption = 'Design message'
@@ -134,42 +134,17 @@ object Form1: TForm1
end
object CheckBox1: TCheckBox
Left = 415
Height = 24
Height = 17
Top = 53
Width = 137
Width = 107
Caption = 'Show close timer'
Checked = True
State = cbChecked
TabOrder = 7
end
object SpeedButton1: TSpeedButton
Left = 422
Height = 26
Top = 7
Width = 26
Glyph.Data = {
1A020000424D1A0200000000000036000000280000000B0000000B0000000100
200000000000E401000064000000640000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000FF0000
00FF00000000000000000000000000000000000000FF000000FF000000000000
00000000000000000000000000FF000000FF0000000000000000000000FF0000
00FF000000000000000000000000000000000000000000000000000000FF0000
00FF000000FF000000FF00000000000000000000000000000000000000000000
00000000000000000000000000FF000000FF0000000000000000000000000000
000000000000000000000000000000000000000000FF000000FF000000FF0000
00FF000000000000000000000000000000000000000000000000000000FF0000
00FF0000000000000000000000FF000000FF0000000000000000000000000000
0000000000FF000000FF00000000000000000000000000000000000000FF0000
00FF000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
}
end
object BitBtn1: TBitBtn
Left = 150
Height = 36
Height = 26
Top = 325
Width = 60
AutoSize = True

View File

@@ -23,7 +23,6 @@ type
Label1: TLabel;
RadioGroup1: TRadioGroup;
RxPopupNotifier1: TRxPopupNotifier;
SpeedButton1: TSpeedButton;
TrackBar1: TTrackBar;
procedure Button1Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
@@ -44,6 +43,7 @@ var
Form1: TForm1;
implementation
uses rxAppUtils;
{$R *.lfm}
@@ -94,7 +94,9 @@ begin
begin
FRClose:=RxPopupNotifier1.AddNotifyItem('Information', 'Static text information without close');
FRClose.ShowCloseTimer:=false;
end
end;
RxMessageBeep(mbsIconExclamation);
end;
procedure TForm1.RadioGroup1Click(Sender: TObject);

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

View File

@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="SecretPanel 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="2">
<Item1>
<PackageName Value="rxnew"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<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>

View File

@@ -0,0 +1,23 @@
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, Unit1, rxnew
{ you can add units after this };
{$R *.res}
begin
Application.Title:='SecretPanel demo';
RequireDerivedFormResource:=True;
Application.Scaled:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,64 @@
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, rxctrls;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
CheckBox1: TCheckBox;
Label1: TLabel;
SecretPanel1: TSecretPanel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure SecretPanel1StartPlay(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
uses rxlclutils;
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
SecretPanel1.Cycled:=CheckBox1.Checked;
SecretPanel1.Play;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
SecretPanel1.Stop;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
SecretPanel1StartPlay(nil);
end;
procedure TForm1.SecretPanel1StartPlay(Sender: TObject);
begin
Button1.Enabled:=not SecretPanel1.Active;
CheckBox1.Enabled:=not SecretPanel1.Active;
Button2.Enabled:=SecretPanel1.Active;
end;
end.