Стартовый пул
This commit is contained in:
63
ANB ST CP/Demo/ParamsMngr/data/DemoMainForm.lfm
Normal file
63
ANB ST CP/Demo/ParamsMngr/data/DemoMainForm.lfm
Normal file
@@ -0,0 +1,63 @@
|
||||
object DemoMainFrm: TDemoMainFrm
|
||||
Left = 642
|
||||
Height = 172
|
||||
Top = 381
|
||||
Width = 326
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsSingle
|
||||
Caption = 'DEMO -- ParamsMngr'
|
||||
ClientHeight = 172
|
||||
ClientWidth = 326
|
||||
Color = clBtnFace
|
||||
Font.CharSet = RUSSIAN_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = 'Times New Roman'
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.2.2.0'
|
||||
object TestSParam: TButton
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 16
|
||||
Width = 310
|
||||
Caption = '/s param test'
|
||||
OnClick = TestSParamClick
|
||||
TabOrder = 0
|
||||
end
|
||||
object TestTestParam: TButton
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 47
|
||||
Width = 310
|
||||
Caption = '/test param test'
|
||||
OnClick = TestTestParamClick
|
||||
TabOrder = 1
|
||||
end
|
||||
object TestVParamValue: TButton
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 78
|
||||
Width = 310
|
||||
Caption = '/v param value test'
|
||||
OnClick = TestVParamValueClick
|
||||
TabOrder = 2
|
||||
end
|
||||
object TestMSGParamValue: TButton
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 109
|
||||
Width = 310
|
||||
Caption = '/msg param value test'
|
||||
OnClick = TestMSGParamValueClick
|
||||
TabOrder = 3
|
||||
end
|
||||
object ExitBtn: TButton
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 140
|
||||
Width = 310
|
||||
Caption = '&Exit'
|
||||
OnClick = ExitBtnClick
|
||||
TabOrder = 4
|
||||
end
|
||||
end
|
56
ANB ST CP/Demo/ParamsMngr/data/DemoMainForm.pas
Normal file
56
ANB ST CP/Demo/ParamsMngr/data/DemoMainForm.pas
Normal file
@@ -0,0 +1,56 @@
|
||||
unit DemoMainForm;
|
||||
{$MODE Delphi}
|
||||
{$codepage UTF8}
|
||||
interface
|
||||
uses LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes,
|
||||
Graphics, Controls, Forms, Dialogs, StdCtrls, ParamsMngr;
|
||||
type
|
||||
TDemoMainFrm = class(TForm)
|
||||
TestSParam: TButton;
|
||||
TestTestParam: TButton;
|
||||
TestVParamValue: TButton;
|
||||
TestMSGParamValue: TButton;
|
||||
ExitBtn: TButton;
|
||||
procedure ExitBtnClick(Sender: TObject);
|
||||
procedure TestSParamClick(Sender: TObject);
|
||||
procedure TestTestParamClick(Sender: TObject);
|
||||
procedure TestVParamValueClick(Sender: TObject);
|
||||
procedure TestMSGParamValueClick(Sender: TObject);
|
||||
private
|
||||
public
|
||||
end;
|
||||
var
|
||||
DemoMainFrm: TDemoMainFrm;
|
||||
implementation
|
||||
{$R *.lfm}
|
||||
procedure ShowDLG (const ATitle, AMessage: string);
|
||||
begin
|
||||
Application.MessageBox(pchar(AMessage), pchar(ATitle), MB_ICONASTERISK);
|
||||
end;
|
||||
procedure TDemoMainFrm.ExitBtnClick(Sender: TObject);
|
||||
begin
|
||||
Application.Terminate;
|
||||
end;
|
||||
procedure TDemoMainFrm.TestMSGParamValueClick(Sender: TObject);
|
||||
begin
|
||||
if HasParam(StartParams, 'msg') then
|
||||
ShowDLG(TestMSGParamValue.Caption, GetParamValue(StartParams, 'msg'))
|
||||
else
|
||||
ShowDLG(TestMSGParamValue.Caption, 'Param "/msg" not founded!');
|
||||
end;
|
||||
procedure TDemoMainFrm.TestSParamClick(Sender: TObject);
|
||||
begin
|
||||
ShowDLG(TestSParam.Caption, BoolToStr(HasParam(StartParams, 's'), true));
|
||||
end;
|
||||
procedure TDemoMainFrm.TestTestParamClick(Sender: TObject);
|
||||
begin
|
||||
ShowDLG(TestTestParam.Caption, BoolToStr(HasParam(StartParams, 'test'), true));
|
||||
end;
|
||||
procedure TDemoMainFrm.TestVParamValueClick(Sender: TObject);
|
||||
begin
|
||||
if HasParam(StartParams, 'v') then
|
||||
ShowDLG(TestVParamValue.Caption, GetParamValue(StartParams, 'v'))
|
||||
else
|
||||
ShowDLG(TestVParamValue.Caption, 'Param "/v" not founded!');
|
||||
end;
|
||||
end.
|
Reference in New Issue
Block a user