2014-08-31 20:11:20 +03:00
|
|
|
unit uFrmCtrls;
|
|
|
|
|
|
|
|
//////////////////////////////////////
|
|
|
|
/// Lina Form Controls Unit ///
|
|
|
|
/// **************************** ///
|
|
|
|
/// (c) 2014 Dennis G�hlert a.o. ///
|
|
|
|
//////////////////////////////////////
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
|
|
|
{ Standard-Units }
|
2014-09-11 03:43:39 +03:00
|
|
|
SysUtils, Classes, Controls, Forms, StdCtrls, ComCtrls, ExtCtrls, Graphics,
|
2014-08-31 20:11:20 +03:00
|
|
|
{ Andere Package-Units }
|
2014-09-11 03:43:39 +03:00
|
|
|
uBase, uSysTools, uBattery, uWebCtrls;
|
2014-08-31 20:11:20 +03:00
|
|
|
|
|
|
|
type
|
|
|
|
{ Hilfsklassen }
|
|
|
|
TSplashScreenMode = (ssmDefault,ssmModal);
|
|
|
|
TSplashScreenAnimation = (ssaNone,ssaShallow);
|
2014-09-09 15:46:12 +03:00
|
|
|
TProgressBarManagerMode = (pmmNone,pmmBattery,pmmDownload);
|
2014-09-11 03:43:39 +03:00
|
|
|
TListBoxManagerMode = (lmmNone,lmmEdit,lmmComboBox);
|
2014-09-08 05:14:45 +03:00
|
|
|
TParamReferenceType = (prtAutomatic,prtChar,prtString,prtInteger,prtFloat);
|
2014-08-31 20:11:20 +03:00
|
|
|
|
|
|
|
type
|
|
|
|
{ Ereignisse }
|
|
|
|
TSplashCreateEvent = procedure(Sender: TObject) of object;
|
|
|
|
TSplashDestroyEvent = procedure(Sender: TObject) of object;
|
|
|
|
TSplashShowEvent = procedure(Sender: TObject) of object;
|
|
|
|
TSplashHideEvent = procedure(Sender: TObject) of object;
|
|
|
|
TSplashChangeEvent = procedure(Sender: TObject) of object;
|
|
|
|
TSplashTimerEvent = procedure(Sender: TObject) of object;
|
2014-09-11 03:43:39 +03:00
|
|
|
TComponentManagerUpdateEvent = procedure(Sender: TObject) of object;
|
2014-08-31 20:11:20 +03:00
|
|
|
|
|
|
|
type
|
|
|
|
{ Hauptklassen }
|
2014-09-09 15:46:12 +03:00
|
|
|
|
|
|
|
{ TSplash... }
|
2014-08-31 20:11:20 +03:00
|
|
|
TSplashForm = class
|
|
|
|
private
|
|
|
|
{ Private-Deklarationen }
|
|
|
|
FBorderStyle: TFormBorderStyle;
|
|
|
|
FBorderIcons: TBorderIcons;
|
|
|
|
FLeft: Integer;
|
|
|
|
FTop: Integer;
|
|
|
|
FWidth: Integer;
|
|
|
|
FHeight: Integer;
|
|
|
|
FAlign: TAlign;
|
|
|
|
FAlphaBlend: Boolean;
|
|
|
|
FAlphaBlendValue: Byte;
|
|
|
|
FCaption: TCaption;
|
|
|
|
FColor: TColor;
|
|
|
|
FEnabled: Boolean;
|
|
|
|
FWindowState: TWindowState;
|
|
|
|
FPosition: TPosition;
|
|
|
|
FCursor: TCursor;
|
|
|
|
public
|
|
|
|
{ Public-Deklarationen }
|
|
|
|
constructor Create;
|
|
|
|
destructor Destroy; override;
|
|
|
|
published
|
|
|
|
{ Published-Deklarationen }
|
|
|
|
property BorderStyle: TFormBorderStyle read FBorderStyle write FBorderStyle default bsNone;
|
|
|
|
property BorderIcons: TBorderIcons read FBorderIcons write FBorderIcons default [];
|
|
|
|
property Left: Integer read FLeft write FLeft default 0;
|
|
|
|
property Top: Integer read FTop write FTop default 0;
|
|
|
|
property Width: Integer read FWidth write FWidth default 600;
|
|
|
|
property Height: Integer read FHeight write FHeight default 400;
|
|
|
|
property Align: TAlign read FAlign write FAlign default alNone;
|
|
|
|
property AlphaBlend: Boolean read FAlphaBlend write FAlphaBlend default False;
|
|
|
|
property AlphaBlendValue: Byte read FAlphaBlendValue write FAlphaBlendValue default 255;
|
|
|
|
property Caption: TCaption read FCaption write FCaption;
|
|
|
|
property Color: TColor read FColor write FColor default clBtnFace;
|
2014-09-02 03:32:37 +03:00
|
|
|
property Enabled: Boolean read FEnabled write FEnabled default True;
|
2014-08-31 20:11:20 +03:00
|
|
|
property WindowState: TWindowState read FWindowState write FWindowState default wsNormal;
|
|
|
|
property Position: TPosition read FPosition write FPosition default poScreenCenter;
|
|
|
|
property Cursor: TCursor read FCursor write FCursor default crHourGlass;
|
|
|
|
end;
|
|
|
|
|
|
|
|
TSplashProgressBar = class
|
|
|
|
private
|
|
|
|
{ Private-Deklarationen }
|
|
|
|
FLeft: Integer;
|
|
|
|
FTop: Integer;
|
|
|
|
FWidth: Integer;
|
|
|
|
FHeight: Integer;
|
|
|
|
FVisible: Boolean;
|
|
|
|
FPosition: Integer;
|
|
|
|
FMin: Integer;
|
|
|
|
FMax: Integer;
|
|
|
|
FAlign: TAlign;
|
|
|
|
FBackgroundColor: TColor;
|
|
|
|
FBarColor: TColor;
|
|
|
|
FState: TProgressBarState;
|
|
|
|
FStyle: TProgressBarStyle;
|
|
|
|
FSmooth: Boolean;
|
|
|
|
FSmoothReverse: Boolean;
|
|
|
|
FMarqueeInterval: Integer;
|
|
|
|
FStep: Integer;
|
|
|
|
public
|
|
|
|
{ Public-Deklarationen }
|
|
|
|
constructor Create;
|
|
|
|
destructor Destroy; override;
|
|
|
|
published
|
|
|
|
{ Published-Deklarationen }
|
|
|
|
property Left: Integer read FLeft write FLeft default 250;
|
|
|
|
property Top: Integer read FTop write FTop default 250;
|
|
|
|
property Width: Integer read FWidth write FWidth default 100;
|
|
|
|
property Height: Integer read FHeight write FHeight default 50;
|
|
|
|
property Visible: Boolean read FVisible write FVisible default True;
|
|
|
|
property Position: Integer read FPosition write FPosition default 0;
|
|
|
|
property Max: Integer read FMax write FMax default 100;
|
|
|
|
property Min: Integer read FMin write FMin default 0;
|
|
|
|
property Align: TAlign read FAlign write FAlign default alNone;
|
|
|
|
property BackgroundColor: TColor read FBackgroundColor write FBackgroundColor default clDefault;
|
|
|
|
property BarColor: TColor read FBarColor write FBarColor default clDefault;
|
|
|
|
property State: TProgressBarState read FState write FState default pbsNormal;
|
|
|
|
property Style: TProgressBarStyle read FStyle write FStyle default pbstNormal;
|
|
|
|
property Smooth: Boolean read FSmooth write FSmooth default False;
|
|
|
|
property SmoothReverse: Boolean read FSmoothReverse write FSmoothReverse default False;
|
|
|
|
property MarqueeInterval: Integer read FMarqueeInterval write FMarqueeInterval default 10;
|
|
|
|
property Step: Integer read FStep write FStep default 10;
|
|
|
|
end;
|
|
|
|
|
|
|
|
TSplashImage = class
|
|
|
|
private
|
|
|
|
{ Private-Deklarationen }
|
|
|
|
FVisible: Boolean;
|
|
|
|
FTransparent: Boolean;
|
|
|
|
FPicture: TPicture;
|
|
|
|
public
|
|
|
|
{ Public-Deklarationen }
|
|
|
|
constructor Create;
|
|
|
|
destructor Destroy; override;
|
|
|
|
published
|
|
|
|
{ Published-Deklarationen }
|
|
|
|
property Visible: Boolean read FVisible write FVisible default True;
|
|
|
|
property Transparent: Boolean read FTransparent write FTransparent default False;
|
|
|
|
property Picture: TPicture read FPicture write FPicture;
|
|
|
|
end;
|
|
|
|
|
|
|
|
TSplashTimer = class
|
|
|
|
private
|
|
|
|
{ Private-Deklarationen }
|
|
|
|
FEnabled: Boolean;
|
|
|
|
FInterval: Cardinal;
|
|
|
|
public
|
|
|
|
{ Public-Deklarationen }
|
|
|
|
constructor Create;
|
|
|
|
destructor Destroy;
|
|
|
|
published
|
|
|
|
{ Published-Deklarationen }
|
|
|
|
property Enabled: Boolean read FEnabled write FEnabled default False;
|
|
|
|
property Interval: Cardinal read FInterval write FInterval default 1000;
|
|
|
|
end;
|
|
|
|
|
|
|
|
TSplashScreen = class(TComponent)
|
|
|
|
private
|
|
|
|
{ Private-Deklarationen }
|
|
|
|
FormObject: TForm;
|
|
|
|
ProgressBarObject: TProgressBar;
|
|
|
|
ImageObject: TImage;
|
|
|
|
TimerObject: TTimer;
|
|
|
|
AnimationTimerShow: TTimer;
|
|
|
|
AnimationTimerHide: TTimer;
|
|
|
|
FAbout: TComponentAbout;
|
|
|
|
FSplashForm: TSplashForm;
|
|
|
|
FSplashProgressBar: TSplashProgressBar;
|
|
|
|
FSplashImage: TSplashImage;
|
|
|
|
FSplashTimer: TSplashTimer;
|
|
|
|
FDisplayTime: Cardinal;
|
|
|
|
FAutoShow: Boolean;
|
|
|
|
FMode: TSplashScreenMode;
|
|
|
|
FAnimation: TSplashScreenAnimation;
|
2014-09-02 03:32:37 +03:00
|
|
|
FAnimationSpeed: Byte;
|
2014-08-31 20:11:20 +03:00
|
|
|
FVisible: Boolean;
|
|
|
|
{ Ereignisse }
|
|
|
|
FCreateEvent: TSplashCreateEvent;
|
|
|
|
FDestroyEvent: TSplashDestroyEvent;
|
|
|
|
FShowEvent: TSplashShowEvent;
|
|
|
|
FHideEvent: TSplashHideEvent;
|
|
|
|
FChangeEvent: TSplashChangeEvent;
|
|
|
|
FTimerEvent: TSplashTimerEvent;
|
|
|
|
{ Methoden }
|
|
|
|
procedure SetVisible(Value: Boolean);
|
|
|
|
procedure FormObjectShow(Sender: TObject);
|
|
|
|
procedure FormObjectHide(Sender: TObject);
|
|
|
|
procedure TimerObjectTimer(Sender: TObject);
|
|
|
|
procedure AnimationTimerShowTimer(Sender: TObject);
|
|
|
|
procedure AnimationTimerHideTimer(Sender: TObject);
|
|
|
|
protected
|
|
|
|
{ Protected-Deklarationen }
|
|
|
|
procedure Refresh; //Vorberaitung (benutzerdefinierte Werte)
|
|
|
|
procedure Reset; //Vorbereitung (standardm��ige Werte)
|
|
|
|
public
|
|
|
|
{ Public-Deklarationen }
|
|
|
|
property Visible: Boolean read FVisible write SetVisible;
|
|
|
|
constructor Create(AOwnder: TComponent); override;
|
|
|
|
destructor Destroy; override;
|
|
|
|
procedure ApplyChanges; //�nderungen �bernehmen
|
|
|
|
procedure Show; //Anzeigen
|
|
|
|
procedure Hide; //Verstecken (schlie�en)
|
|
|
|
published
|
|
|
|
{ Published-Deklarationen }
|
|
|
|
{ Ereignisse }
|
|
|
|
property OnCreate: TSplashCreateEvent read FCreateEvent write FCreateEvent;
|
|
|
|
property OnDestroy: TSplashDestroyEvent read FDestroyEvent write FDestroyEvent;
|
|
|
|
property OnShow: TSplashShowEvent read FShowEvent write FShowEvent;
|
|
|
|
property OnHide: TSplashHideEvent read FHideEvent write FHideEvent;
|
|
|
|
property OnChange: TSplashChangeEvent read FChangeEvent write FChangeEvent;
|
|
|
|
property OnTimer: TSplashTimerEvent read FTimerEvent write FTimerEvent;
|
|
|
|
{ Eigenschaften }
|
2014-09-05 02:16:55 +03:00
|
|
|
property About: TComponentAbout read FAbout;
|
2014-08-31 20:11:20 +03:00
|
|
|
property SplashForm: TSplashForm read FSplashForm write FSplashForm;
|
|
|
|
property SplashProgressBar: TSplashProgressBar read FSplashProgressBar write FSplashProgressBar;
|
|
|
|
property SplashImage: TSplashImage read FSplashImage write FSplashImage;
|
|
|
|
property SplashTimer: TSplashTimer read FSplashTimer write FSplashTimer;
|
|
|
|
property DisplayTime: Cardinal read FDisplayTime write FDisplayTime default 2000;
|
2014-09-02 03:32:37 +03:00
|
|
|
property AutoShow: Boolean read FAutoShow write FAutoShow default False;
|
2014-08-31 20:11:20 +03:00
|
|
|
property Mode: TSplashScreenMode read FMode write FMode default ssmDefault;
|
2014-09-02 03:32:37 +03:00
|
|
|
property Animation: TSplashScreenAnimation read FAnimation write FAnimation default ssaNone;
|
|
|
|
property AnimationSpeed: Byte read FAnimationSpeed write FAnimationSpeed default 10;
|
2014-08-31 20:11:20 +03:00
|
|
|
end;
|
|
|
|
|
2014-09-11 03:43:39 +03:00
|
|
|
{ T...Manager }
|
|
|
|
|
|
|
|
TComponentManager = class(TComponent)
|
|
|
|
private
|
|
|
|
{ Private-Deklarationen }
|
|
|
|
FAbout: TComponentAbout;
|
|
|
|
{ Ereignisse }
|
|
|
|
FUpdateEvent: TComponentManagerUpdateEvent;
|
|
|
|
public
|
|
|
|
{ Public-Deklarationen }
|
|
|
|
constructor Create(AOwner: TComponent); override;
|
|
|
|
destructor Destroy; override;
|
|
|
|
procedure Update;
|
|
|
|
published
|
|
|
|
{ Published-Deklarationen }
|
|
|
|
{ Ereignisse }
|
|
|
|
property OnUpdate: TComponentManagerUpdateEvent read FUpdateEvent write FUpdateEvent;
|
|
|
|
{ Eigenschaften }
|
|
|
|
property About: TComponentAbout read FAbout;
|
|
|
|
end;
|
|
|
|
|
|
|
|
TProgressBarManager = class(TComponentManager)
|
2014-09-08 05:14:45 +03:00
|
|
|
private
|
|
|
|
{ Private-Deklarationen }
|
2014-09-09 15:46:12 +03:00
|
|
|
FAbout: TComponentAbout;
|
|
|
|
FTarget: TProgressBar;
|
|
|
|
FSourceBattery: TBattery;
|
|
|
|
FSourceDownload: TDownload;
|
|
|
|
FMode: TProgressBarManagerMode;
|
|
|
|
{ Methoden }
|
|
|
|
procedure SetTarget(Value: TProgressBar);
|
|
|
|
procedure SetSourceBattery(Value: TBattery);
|
|
|
|
procedure SetSourceDownload(Value: TDownload);
|
|
|
|
procedure SetMode(Value: TProgressBarManagerMode);
|
2014-09-08 05:14:45 +03:00
|
|
|
public
|
|
|
|
{ Public-Deklarationen }
|
2014-09-09 15:46:12 +03:00
|
|
|
constructor Create(AOwner: TComponent); override;
|
|
|
|
destructor Destroy; override;
|
|
|
|
procedure Update;
|
2014-09-08 05:14:45 +03:00
|
|
|
published
|
|
|
|
{ Published-Deklarationen }
|
2014-09-09 15:46:12 +03:00
|
|
|
property Target: TProgressBar read FTarget write SetTarget;
|
|
|
|
property SourceBattery: TBattery read FSourceBattery write SetSourceBattery;
|
|
|
|
property SourceDownload: TDownload read FSourceDownload write SetSourceDownload;
|
|
|
|
property Mode: TProgressBarManagerMode read FMode write SetMode default pmmNone;
|
2014-09-08 05:14:45 +03:00
|
|
|
end;
|
|
|
|
|
2014-09-11 03:43:39 +03:00
|
|
|
TListBoxManager = class(TComponentManager)
|
|
|
|
private
|
|
|
|
{ Private-Deklarationen }
|
|
|
|
FilteredList: TFilteredStringList;
|
|
|
|
FTarget: TListBox;
|
|
|
|
FSourceEdit: TEdit;
|
|
|
|
FSourceComboBox: TComboBox;
|
|
|
|
FMode: TListBoxManagerMode;
|
|
|
|
FFilterOptions: TStringFilterOptions;
|
|
|
|
{ Methoden }
|
|
|
|
procedure SetTarget(Value: TListBox);
|
|
|
|
procedure SetSourceEdit(Value: TEdit);
|
|
|
|
procedure SetSourceComboBox(Value: TComboBox);
|
|
|
|
procedure SetMode(Value: TListBoxManagerMode);
|
|
|
|
procedure SetFilterOptions(Value: TStringFilterOptions);
|
|
|
|
public
|
|
|
|
{ Public-Deklarationen }
|
|
|
|
constructor Create(AOwner: TComponent); override;
|
|
|
|
destructor Destroy; override;
|
|
|
|
procedure Update;
|
|
|
|
procedure LoadList;
|
|
|
|
published
|
|
|
|
{ Published-Deklarationen }
|
|
|
|
property Target: TListBox read FTarget write SetTarget;
|
|
|
|
property SourceEdit: TEdit read FSourceEdit write SetSourceEdit;
|
|
|
|
property SourceComboBox: TComboBox read FSourceComboBox write SetSourceComboBox;
|
|
|
|
property Mode: TListBoxManagerMode read FMode write SetMode default lmmNone;
|
|
|
|
property FilterOptions: TStringFilterOptions read FFilterOptions write SetFilterOptions default [sfoCaseSensitive,sfoForceTrim,sfoDefaultVisible];
|
|
|
|
end;
|
|
|
|
|
2014-09-09 15:46:12 +03:00
|
|
|
{ TParam... }
|
2014-09-08 05:14:45 +03:00
|
|
|
TParamFormat = class
|
|
|
|
private
|
|
|
|
{ Private-Deklarationen }
|
|
|
|
FPrefix: String;
|
|
|
|
FSuffix: String;
|
|
|
|
FSeperator: String;
|
|
|
|
public
|
|
|
|
{ Public-Deklarationen }
|
|
|
|
constructor Create;
|
2014-09-09 15:46:12 +03:00
|
|
|
destructor Destroy; override;
|
|
|
|
published
|
|
|
|
{ Published-Deklarationen }
|
|
|
|
property Prefix: String read FPrefix write FPrefix;
|
|
|
|
property Suffix: String read FSuffix write FSuffix;
|
|
|
|
property Seperator: String read FSeperator write FSeperator;
|
|
|
|
end;
|
|
|
|
|
|
|
|
TParamReference = class
|
|
|
|
private
|
|
|
|
{ Private-Deklarationen }
|
|
|
|
FParamType: TParamReferenceType;
|
|
|
|
FDefaultValue: Variant;
|
|
|
|
FConnector: Pointer;
|
|
|
|
FFormat: TParamFormat;
|
|
|
|
public
|
|
|
|
{ Public-Deklarationen }
|
|
|
|
constructor Create;
|
|
|
|
destructor Destroy; override;
|
2014-09-08 05:14:45 +03:00
|
|
|
published
|
|
|
|
{ Published-Deklarationen }
|
2014-09-09 15:46:12 +03:00
|
|
|
property ParamType: TParamReferenceType read FParamType write FParamType default prtAutomatic;
|
|
|
|
property DefaultValue: Variant read FDefaultValue write FDefaultValue;
|
|
|
|
// property Connector: Pointer read FConnector write FConnector;
|
|
|
|
property Format: TParamFormat read FFormat write FFormat;
|
2014-09-08 05:14:45 +03:00
|
|
|
end;
|
|
|
|
|
|
|
|
TParamDefiner = class(TComponent)
|
|
|
|
private
|
|
|
|
{ Private-Deklarationen }
|
2014-09-09 15:46:12 +03:00
|
|
|
FAbout: TComponentAbout;
|
|
|
|
// FReferences: TObjectList;
|
2014-09-08 05:14:45 +03:00
|
|
|
public
|
|
|
|
{ Public-Deklarationen }
|
|
|
|
constructor Create(AOwner: TComponent); override;
|
|
|
|
destructor Destroy; override;
|
2014-09-09 15:46:12 +03:00
|
|
|
// property References [Index]: TParamReference read FReferences write FReferences;
|
|
|
|
published
|
|
|
|
{ Published-Deklarationen }
|
|
|
|
property About: TComponentAbout read FAbout;
|
2014-09-08 05:14:45 +03:00
|
|
|
end;
|
|
|
|
|
2014-08-31 20:11:20 +03:00
|
|
|
procedure Register;
|
|
|
|
|
|
|
|
const
|
|
|
|
{ Meta-Daten }
|
2014-09-10 02:53:24 +03:00
|
|
|
SplashScreenComponent_Name = 'SplashScreen';
|
|
|
|
SplashScreenComponent_Version = 1.0;
|
|
|
|
SplashScreenComponent_Copyright = 'Copyright � 2014';
|
|
|
|
SplashScreenComponent_Author = 'Dennis G�hlert a.o.';
|
2014-08-31 20:11:20 +03:00
|
|
|
|
2014-09-09 15:46:12 +03:00
|
|
|
ProgressBarManagerComponent_Name = 'ProgressBarManager';
|
|
|
|
ProgressBarManagerComponent_Version = 1.0;
|
|
|
|
ProgressBarManagerComponent_Copyright = 'Copyright � 2014';
|
|
|
|
ProgressBarManagerComponent_Author = 'Dennis G�hlert a.o.';
|
|
|
|
|
2014-09-11 03:43:39 +03:00
|
|
|
ListBoxManagerComponent_Name = 'ListBoxManager';
|
|
|
|
ListBoxManagerComponent_Version = 1.0;
|
|
|
|
ListBoxManagerComponent_Copyright = 'Copyright � 2014';
|
|
|
|
ListBoxManagerComponent_Author = 'Dennis G�hlert a.o.';
|
|
|
|
|
2014-09-10 02:53:24 +03:00
|
|
|
ParamDefinerComponent_Name = 'ParamDefiner';
|
|
|
|
ParamDefinerComponent_Version = 1.0;
|
|
|
|
ParamDefinerComponent_Copyright = 'Copyright � 2014';
|
|
|
|
ParamDefinerComponent_Author = 'Dennis G�hlert a.o.';
|
2014-09-09 15:46:12 +03:00
|
|
|
|
2014-08-31 20:11:20 +03:00
|
|
|
implementation
|
|
|
|
|
|
|
|
procedure Register;
|
|
|
|
begin
|
2014-09-11 03:43:39 +03:00
|
|
|
RegisterComponents(ComponentsPage,[TSplashScreen,TProgressBarManager,TListBoxManager]);
|
2014-08-31 20:11:20 +03:00
|
|
|
end;
|
|
|
|
|
|
|
|
{ ----------------------------------------------------------------------------
|
|
|
|
TSplashForm
|
|
|
|
---------------------------------------------------------------------------- }
|
|
|
|
|
|
|
|
constructor TSplashForm.Create;
|
|
|
|
begin
|
2014-09-02 03:32:37 +03:00
|
|
|
//...
|
2014-08-31 20:11:20 +03:00
|
|
|
end;
|
|
|
|
|
|
|
|
destructor TSplashForm.Destroy;
|
|
|
|
begin
|
|
|
|
//...
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
{ ----------------------------------------------------------------------------
|
|
|
|
TSplashProgressBar
|
|
|
|
---------------------------------------------------------------------------- }
|
|
|
|
|
|
|
|
constructor TSplashProgressBar.Create;
|
|
|
|
begin
|
|
|
|
//...
|
|
|
|
end;
|
|
|
|
|
|
|
|
destructor TSplashProgressBar.Destroy;
|
|
|
|
begin
|
|
|
|
//...
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
{ ----------------------------------------------------------------------------
|
|
|
|
TSplashImage
|
|
|
|
---------------------------------------------------------------------------- }
|
|
|
|
|
|
|
|
constructor TSplashImage.Create;
|
|
|
|
begin
|
|
|
|
FPicture := TPicture.Create;
|
|
|
|
end;
|
|
|
|
|
|
|
|
destructor TSplashImage.Destroy;
|
|
|
|
begin
|
|
|
|
FPicture.Free;
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
{ ----------------------------------------------------------------------------
|
|
|
|
TSplashTimer
|
|
|
|
---------------------------------------------------------------------------- }
|
|
|
|
|
|
|
|
constructor TSplashTimer.Create;
|
|
|
|
begin
|
|
|
|
//...
|
|
|
|
end;
|
|
|
|
|
|
|
|
destructor TSplashTimer.Destroy;
|
|
|
|
begin
|
|
|
|
//...
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
{ ----------------------------------------------------------------------------
|
|
|
|
TSplashScreen
|
|
|
|
---------------------------------------------------------------------------- }
|
|
|
|
|
|
|
|
constructor TSplashScreen.Create(AOwnder: TComponent);
|
|
|
|
begin
|
|
|
|
inherited;
|
2014-09-02 03:32:37 +03:00
|
|
|
FDisplayTime := 2000;
|
|
|
|
FAutoShow := False;
|
|
|
|
FMode := ssmDefault;
|
|
|
|
FAnimation := ssaNone;
|
|
|
|
FAnimationSpeed := 10;
|
|
|
|
FVisible := False;
|
|
|
|
|
2014-09-10 02:53:24 +03:00
|
|
|
FAbout := TComponentAbout.Create(SplashScreenComponent_Name,SplashScreenComponent_Version,SplashScreenComponent_Copyright,SplashScreenComponent_Author);
|
2014-08-31 20:11:20 +03:00
|
|
|
FSplashForm := TSplashForm.Create;
|
|
|
|
FSplashProgressBar := TSplashProgressBar.Create;
|
|
|
|
FSplashImage := TSplashImage.Create;
|
|
|
|
FSplashTimer := TSplashTimer.Create;
|
2014-09-02 03:32:37 +03:00
|
|
|
|
2014-08-31 20:11:20 +03:00
|
|
|
FormObject := TForm.Create(Self);
|
|
|
|
FormObject.OnShow := FormObjectShow;
|
|
|
|
FormObject.OnHide := FormObjectHide;
|
2014-09-08 05:14:45 +03:00
|
|
|
FormObject.Visible := False;
|
2014-08-31 20:11:20 +03:00
|
|
|
ProgressBarObject := TProgressBar.Create(Self);
|
|
|
|
ProgressBarObject.Parent := FormObject;
|
|
|
|
ImageObject := TImage.Create(Self);
|
|
|
|
ImageObject.Parent := FormObject;
|
|
|
|
TimerObject := TTimer.Create(Self);
|
|
|
|
TimerObject.OnTimer := TimerObjectTimer;
|
2014-09-02 03:32:37 +03:00
|
|
|
TimerObject.Enabled := False;
|
2014-08-31 20:11:20 +03:00
|
|
|
|
|
|
|
AnimationTimerShow := TTimer.Create(Self);
|
|
|
|
AnimationTimerShow.OnTimer := AnimationTimerShowTimer;
|
|
|
|
AnimationTimerShow.Enabled := False;
|
|
|
|
AnimationTimerShow.Interval := 50;
|
|
|
|
AnimationTimerHide := TTimer.Create(Self);
|
|
|
|
AnimationTimerHide.OnTimer := AnimationTimerHideTimer;
|
|
|
|
AnimationTimerHide.Enabled := False;
|
|
|
|
AnimationTimerHide.Interval := 50;
|
|
|
|
Reset;
|
|
|
|
if Assigned(OnCreate) then
|
|
|
|
begin
|
|
|
|
OnCreate(Self);
|
|
|
|
end;
|
2014-09-02 03:32:37 +03:00
|
|
|
{ Erst NACHDEM fertig erstellt wurde und OnCreate-Event ausgef�hrt wurde... }
|
|
|
|
if AutoShow = True then
|
|
|
|
begin
|
|
|
|
Show;
|
|
|
|
end;
|
2014-08-31 20:11:20 +03:00
|
|
|
end;
|
|
|
|
|
|
|
|
destructor TSplashScreen.Destroy;
|
|
|
|
begin
|
|
|
|
if Assigned(OnDestroy) then
|
|
|
|
begin
|
|
|
|
OnDestroy(Self);
|
|
|
|
end;
|
|
|
|
FAbout.Free;
|
|
|
|
FSplashForm.Free;
|
|
|
|
FSplashProgressBar.Free;
|
|
|
|
FSplashImage.Free;
|
|
|
|
FSplashTimer.Free;
|
|
|
|
FormObject.Close;
|
|
|
|
FormObject.Free;
|
|
|
|
//ProgressBarObject.Free; _
|
|
|
|
//ImageObject.Free; |
|
|
|
|
//TimerObject.Free; |____\ Automatisch
|
|
|
|
//AnimationTimerShow.Free; | / freigegeben
|
|
|
|
//AnimationTimerHide.Free; _|
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TSplashScreen.Show;
|
|
|
|
begin
|
|
|
|
ApplyChanges;
|
|
|
|
if Mode = ssmModal then
|
|
|
|
begin
|
|
|
|
FormObject.ShowModal;
|
|
|
|
end else
|
|
|
|
begin
|
|
|
|
FormObject.Show;
|
|
|
|
end;
|
|
|
|
if Animation = ssaShallow then
|
|
|
|
begin
|
|
|
|
FormObject.AlphaBlend := True;
|
|
|
|
FormObject.AlphaBlendValue := 0;
|
2014-09-02 03:32:37 +03:00
|
|
|
AnimationTimerHide.Enabled := False;
|
2014-08-31 20:11:20 +03:00
|
|
|
AnimationTimerShow.Enabled := True;
|
|
|
|
end;
|
|
|
|
FVisible := True;
|
|
|
|
FormObject.BringToFront;
|
2014-09-02 03:32:37 +03:00
|
|
|
if Assigned(OnShow) then
|
|
|
|
begin
|
|
|
|
OnShow(Self);
|
|
|
|
end;
|
2014-08-31 20:11:20 +03:00
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TSplashScreen.Hide;
|
|
|
|
begin
|
2014-09-02 03:32:37 +03:00
|
|
|
TimerObject.Enabled := False;
|
2014-08-31 20:11:20 +03:00
|
|
|
if Animation = ssaNone then
|
|
|
|
begin
|
|
|
|
FormObject.Hide;
|
|
|
|
end else
|
|
|
|
begin
|
|
|
|
if Animation = ssaShallow then
|
|
|
|
begin
|
|
|
|
FormObject.AlphaBlend := True;
|
2014-09-02 03:32:37 +03:00
|
|
|
AnimationTimerShow.Enabled := False;
|
2014-08-31 20:11:20 +03:00
|
|
|
AnimationTimerHide.Enabled := True;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
FVisible := False;
|
|
|
|
if Assigned(OnHide) then
|
|
|
|
begin
|
|
|
|
OnHide(Self);
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TSplashScreen.ApplyChanges;
|
|
|
|
begin
|
|
|
|
{ "Refresh;" ist nicht public, deswegen hier eine Referenz.
|
|
|
|
Falls beim �bernehmen der �nderungen noch sonstige Dinge getan werden
|
|
|
|
m�ssen, k�nnen diese hier definiert werden. }
|
|
|
|
Refresh;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TSplashScreen.Refresh;
|
|
|
|
begin
|
|
|
|
{ TSplashForm -> TForm }
|
|
|
|
FormObject.BorderStyle := SplashForm.BorderStyle;
|
|
|
|
FormObject.BorderIcons := SplashForm.BorderIcons;
|
|
|
|
FormObject.Left := SplashForm.Left;
|
|
|
|
FormObject.Top := SplashForm.Top;
|
|
|
|
FormObject.Width := SplashForm.Width;
|
|
|
|
FormObject.Height := SplashForm.Height;
|
|
|
|
FormObject.Align := SplashForm.Align;
|
|
|
|
FormObject.AlphaBlend := SplashForm.AlphaBlend;
|
|
|
|
FormObject.AlphaBlendValue := SplashForm.AlphaBlendValue;
|
|
|
|
FormObject.Caption := SplashForm.Caption;
|
|
|
|
FormObject.Color := SplashForm.Color;
|
|
|
|
FormObject.Enabled := SplashForm.Enabled;
|
|
|
|
FormObject.WindowState := SplashForm.WindowState;
|
|
|
|
FormObject.Position := SplashForm.Position;
|
|
|
|
FormObject.Cursor := SplashForm.Cursor;
|
|
|
|
{ TSplashProgressBar -> TProgressBar }
|
|
|
|
ProgressBarObject.Left := SplashProgressBar.Left;
|
|
|
|
ProgressBarObject.Top := SplashProgressBar.Top;
|
|
|
|
ProgressBarObject.Width := SplashProgressBar.Width;
|
|
|
|
ProgressBarObject.Height := SplashProgressBar.Height;
|
|
|
|
ProgressBarObject.Visible := SplashProgressBar.Visible;
|
|
|
|
ProgressBarObject.Position := SplashProgressBar.Position;
|
|
|
|
ProgressBarObject.Max := SplashProgressBar.Max;
|
|
|
|
ProgressBarObject.Min := SplashProgressBar.Min;
|
2014-09-05 02:16:55 +03:00
|
|
|
ProgressBarObject.Cursor := FormObject.Cursor;
|
2014-08-31 20:11:20 +03:00
|
|
|
ProgressBarObject.Align := SplashProgressBar.Align;
|
|
|
|
ProgressBarObject.BackgroundColor := SplashProgressBar.BackgroundColor;
|
|
|
|
ProgressBarObject.BarColor := SplashProgressBar.BarColor;
|
|
|
|
ProgressBarObject.State := SplashProgressBar.State;
|
|
|
|
ProgressBarObject.Style := SplashProgressBar.Style;
|
|
|
|
ProgressBarObject.Smooth := SplashProgressBar.Smooth;
|
|
|
|
ProgressBarObject.SmoothReverse := SplashProgressBar.SmoothReverse;
|
|
|
|
ProgressBarObject.MarqueeInterval := SplashProgressBar.MarqueeInterval;
|
|
|
|
ProgressBarObject.Step := SplashProgressBar.Step;
|
|
|
|
{ TSplashImage -> TImage }
|
|
|
|
ImageObject.Visible := SplashImage.Visible;
|
|
|
|
ImageObject.Transparent := SplashImage.Transparent;
|
|
|
|
ImageObject.Picture := SplashImage.Picture;
|
|
|
|
{ TSplashTimer -> TTimer }
|
|
|
|
TimerObject.Enabled := SplashTimer.Enabled;
|
|
|
|
TimerObject.Interval := SplashTimer.Interval;
|
|
|
|
if Assigned(OnChange) then
|
|
|
|
begin
|
|
|
|
OnChange(Self);
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TSplashScreen.Reset;
|
|
|
|
begin
|
|
|
|
{ TSplashForm }
|
|
|
|
SplashForm.BorderStyle := bsNone;
|
|
|
|
SplashForm.BorderIcons := [];
|
|
|
|
SplashForm.Left := 0;
|
|
|
|
SplashForm.Top := 0;
|
|
|
|
SplashForm.Width := 600;
|
|
|
|
SplashForm.Height := 400;
|
|
|
|
SplashForm.Align := alNone;
|
|
|
|
SplashForm.AlphaBlend := False;
|
|
|
|
SplashForm.AlphaBlendValue := 255;
|
|
|
|
SplashForm.Color := clBtnFace;
|
2014-09-02 03:32:37 +03:00
|
|
|
SplashForm.Enabled := True;
|
2014-08-31 20:11:20 +03:00
|
|
|
SplashForm.WindowState := wsNormal;
|
|
|
|
SplashForm.Position := poScreenCenter;
|
|
|
|
SplashForm.Cursor := crHourGlass;
|
|
|
|
{ TSplashProgressBar }
|
|
|
|
SplashProgressBar.Left := 250;
|
|
|
|
SplashProgressBar.Top := 250;
|
|
|
|
SplashProgressBar.Width := 100;
|
|
|
|
SplashProgressBar.Height := 50;
|
|
|
|
SplashProgressBar.Visible := True;
|
|
|
|
SplashProgressBar.Position := 0;
|
|
|
|
SplashProgressBar.Max := 100;
|
|
|
|
SplashProgressBar.Min := 0;
|
|
|
|
SplashProgressBar.Align := alNone;
|
|
|
|
SplashProgressBar.BackgroundColor := clDefault;
|
|
|
|
SplashProgressBar.BarColor := clDefault;
|
|
|
|
SplashProgressBar.State := pbsNormal;
|
|
|
|
SplashProgressBar.Style := pbstNormal;
|
|
|
|
SplashProgressBar.Smooth := False;
|
|
|
|
SplashProgressBar.SmoothReverse := False;
|
|
|
|
SplashProgressBar.MarqueeInterval := 10;
|
|
|
|
SplashProgressBar.Step := 10;
|
|
|
|
{ TSplashImage }
|
|
|
|
SplashImage.Visible := True;
|
|
|
|
SplashImage.Transparent := False;
|
|
|
|
{ TSplashTimer }
|
|
|
|
SplashTimer.Enabled := False;
|
|
|
|
SplashTimer.Interval := 1000;
|
|
|
|
if Assigned(OnChange) then
|
|
|
|
begin
|
|
|
|
OnChange(Self);
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TSplashScreen.SetVisible(Value: Boolean);
|
|
|
|
begin
|
|
|
|
if Value = True then
|
|
|
|
begin
|
|
|
|
Show;
|
|
|
|
end else
|
|
|
|
begin
|
|
|
|
Hide;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TSplashScreen.FormObjectShow(Sender: TObject);
|
|
|
|
begin
|
|
|
|
//...
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TSplashScreen.FormObjectHide(Sender: TObject);
|
|
|
|
begin
|
|
|
|
//...
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TSplashScreen.TimerObjectTimer(Sender: TObject);
|
|
|
|
begin
|
|
|
|
if Assigned(OnTimer) then
|
|
|
|
begin
|
|
|
|
OnTimer(Self);
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TSplashScreen.AnimationTimerShowTimer(Sender: TObject);
|
|
|
|
begin
|
|
|
|
if Animation = ssaShallow then
|
|
|
|
begin
|
2014-09-02 03:32:37 +03:00
|
|
|
if FormObject.AlphaBlendValue < SplashForm.AlphaBlendValue then
|
2014-08-31 20:11:20 +03:00
|
|
|
begin
|
2014-09-02 03:32:37 +03:00
|
|
|
if SplashForm.AlphaBlendValue - FormObject.AlphaBlendValue < AnimationSpeed then
|
2014-08-31 20:11:20 +03:00
|
|
|
begin
|
|
|
|
FormObject.AlphaBlendValue := FormObject.AlphaBlendValue + (SplashForm.AlphaBlendValue - FormObject.AlphaBlendValue);
|
|
|
|
end else
|
|
|
|
begin
|
2014-09-02 03:32:37 +03:00
|
|
|
FormObject.AlphaBlendValue := FormObject.AlphaBlendValue + AnimationSpeed;
|
2014-08-31 20:11:20 +03:00
|
|
|
end;
|
|
|
|
end else
|
|
|
|
begin
|
|
|
|
AnimationTimerShow.Enabled := False;
|
|
|
|
FormObject.AlphaBlend := SplashForm.AlphaBlend;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TSplashScreen.AnimationTimerHideTimer(Sender: TObject);
|
|
|
|
begin
|
|
|
|
if Animation = ssaShallow then
|
|
|
|
begin
|
2014-09-02 03:32:37 +03:00
|
|
|
if FormObject.AlphaBlendValue > 0 then
|
2014-08-31 20:11:20 +03:00
|
|
|
begin
|
2014-09-02 03:32:37 +03:00
|
|
|
if FormObject.AlphaBlendValue < AnimationSpeed then
|
2014-08-31 20:11:20 +03:00
|
|
|
begin
|
|
|
|
FormObject.AlphaBlendValue := FormObject.AlphaBlendValue - FormObject.AlphaBlendValue;
|
|
|
|
end else
|
|
|
|
begin
|
2014-09-02 03:32:37 +03:00
|
|
|
FormObject.AlphaBlendValue := FormObject.AlphaBlendValue - AnimationSpeed;
|
2014-08-31 20:11:20 +03:00
|
|
|
end;
|
2014-09-02 03:32:37 +03:00
|
|
|
end else
|
|
|
|
begin
|
|
|
|
AnimationTimerHide.Enabled := False;
|
|
|
|
FormObject.AlphaBlend := SplashForm.AlphaBlend;
|
|
|
|
FormObject.Hide;
|
2014-08-31 20:11:20 +03:00
|
|
|
end;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
2014-09-11 03:43:39 +03:00
|
|
|
{ ----------------------------------------------------------------------------
|
|
|
|
TComponentManager
|
|
|
|
---------------------------------------------------------------------------- }
|
|
|
|
|
|
|
|
constructor TComponentManager.Create(AOwner: TComponent);
|
|
|
|
begin
|
|
|
|
inherited;
|
|
|
|
//...
|
|
|
|
end;
|
|
|
|
|
|
|
|
destructor TComponentManager.Destroy;
|
|
|
|
begin
|
|
|
|
//...
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TComponentManager.Update;
|
|
|
|
begin
|
|
|
|
//...
|
|
|
|
end;
|
|
|
|
|
2014-09-09 15:46:12 +03:00
|
|
|
{ ----------------------------------------------------------------------------
|
|
|
|
TProgressBarManager
|
|
|
|
---------------------------------------------------------------------------- }
|
|
|
|
|
|
|
|
constructor TProgressBarManager.Create(AOwner: TComponent);
|
|
|
|
begin
|
|
|
|
inherited;
|
|
|
|
FAbout := TComponentAbout.Create(ProgressBarManagerComponent_Name,ProgressBarManagerComponent_Version,ProgressBarManagerComponent_Copyright,ProgressBarManagerComponent_Author);
|
|
|
|
FMode := pmmNone;
|
|
|
|
|
|
|
|
Update;
|
|
|
|
end;
|
|
|
|
|
|
|
|
destructor TProgressBarManager.Destroy;
|
|
|
|
begin
|
|
|
|
FAbout.Free;
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TProgressBarManager.Update;
|
|
|
|
begin
|
2014-09-11 03:43:39 +03:00
|
|
|
inherited;
|
|
|
|
if Assigned(Target) = False then
|
|
|
|
begin
|
|
|
|
Exit;
|
|
|
|
end;
|
2014-09-09 15:46:12 +03:00
|
|
|
if Mode <> pmmNone then
|
|
|
|
begin
|
|
|
|
if (Mode = pmmBattery) and (Assigned(SourceBattery) = False)
|
|
|
|
or (Mode = pmmDownload) and (Assigned(SourceDownload) = False) then
|
|
|
|
begin
|
|
|
|
Exit;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
if Mode = pmmBattery then
|
|
|
|
begin
|
|
|
|
Target.Position := (Target.Max div 100) * SourceBattery.GetBatteryPercent;
|
|
|
|
end;
|
|
|
|
if Mode = pmmDownload then
|
|
|
|
begin
|
|
|
|
Target.Position := (Target.Max div 100) * SourceDownload.GetProgressPercent;
|
|
|
|
end;
|
|
|
|
if Assigned(OnUpdate) then
|
|
|
|
begin
|
|
|
|
OnUpdate(Self);
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TProgressBarManager.SetTarget(Value: TProgressBar);
|
|
|
|
begin
|
|
|
|
FTarget := Value;
|
|
|
|
Update;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TProgressBarManager.SetSourceBattery(Value: TBattery);
|
|
|
|
begin
|
|
|
|
FSourceBattery := Value;
|
|
|
|
if Mode = pmmBattery then
|
|
|
|
begin
|
|
|
|
Update;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TProgressBarManager.SetSourceDownload(Value: TDownload);
|
|
|
|
begin
|
|
|
|
FSourceDownload := Value;
|
|
|
|
if Mode = pmmDownload then
|
|
|
|
begin
|
|
|
|
Update;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TProgressBarManager.SetMode(Value: TProgressBarManagerMode);
|
|
|
|
begin
|
|
|
|
FMode := Value;
|
|
|
|
Update;
|
|
|
|
end;
|
|
|
|
|
2014-09-11 03:43:39 +03:00
|
|
|
{ ----------------------------------------------------------------------------
|
|
|
|
TListBoxManager
|
|
|
|
---------------------------------------------------------------------------- }
|
|
|
|
|
|
|
|
constructor TListBoxManager.Create(AOwner: TComponent);
|
|
|
|
begin
|
|
|
|
inherited;
|
|
|
|
FAbout := TComponentAbout.Create(ListBoxManagerComponent_Name,ListBoxManagerComponent_Version,ListBoxManagerComponent_Copyright,ListBoxManagerComponent_Author);
|
|
|
|
FMode := lmmNone;
|
|
|
|
FFilterOptions := [sfoCaseSensitive,sfoForceTrim,sfoDefaultVisible];
|
|
|
|
FilteredList := TFilteredStringList.Create;
|
|
|
|
Update;
|
|
|
|
end;
|
|
|
|
|
|
|
|
destructor TListBoxManager.Destroy;
|
|
|
|
begin
|
|
|
|
FAbout.Free;
|
|
|
|
FilteredList.Free;
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TListBoxManager.Update;
|
|
|
|
begin
|
|
|
|
inherited;
|
|
|
|
if Assigned(Target) = False then
|
|
|
|
begin
|
|
|
|
Exit;
|
|
|
|
end;
|
|
|
|
if Mode <> lmmNone then
|
|
|
|
begin
|
|
|
|
if (Mode = lmmEdit) and (Assigned(SourceEdit) = False)
|
|
|
|
or (Mode = lmmComboBox) and (Assigned(SourceComboBox) = False) then
|
|
|
|
begin
|
|
|
|
Exit;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
if Mode = lmmEdit then
|
|
|
|
begin
|
|
|
|
FilteredList.Filter := SourceEdit.Text;
|
|
|
|
end;
|
|
|
|
if Mode = lmmComboBox then
|
|
|
|
begin
|
|
|
|
FilteredList.Filter := SourceComboBox.Text;
|
|
|
|
end;
|
|
|
|
Target.Items.Assign(FilteredList.FilteredStrings);
|
|
|
|
if Assigned(OnUpdate) then
|
|
|
|
begin
|
|
|
|
OnUpdate(Self);
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TListBoxManager.LoadList;
|
|
|
|
begin
|
|
|
|
if Assigned(Target) then
|
|
|
|
begin
|
|
|
|
FilteredList.Assign(Target.Items);
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TListBoxManager.SetTarget(Value: TListBox);
|
|
|
|
begin
|
|
|
|
FTarget := Value;
|
|
|
|
LoadList;
|
|
|
|
Update;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TListBoxManager.SetSourceEdit(Value: TEdit);
|
|
|
|
begin
|
|
|
|
FSourceEdit := Value;
|
|
|
|
if Mode = lmmEdit then
|
|
|
|
begin
|
|
|
|
Update;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TListBoxManager.SetSourceComboBox(Value: TComboBox);
|
|
|
|
begin
|
|
|
|
FSourceComboBox := Value;
|
|
|
|
if Mode = lmmComboBox then
|
|
|
|
begin
|
|
|
|
Update;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TListBoxManager.SetMode(Value: TListBoxManagerMode);
|
|
|
|
begin
|
|
|
|
FMode := Value;
|
|
|
|
Update;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TListBoxManager.SetFilterOptions(Value: TStringFilterOptions);
|
|
|
|
begin
|
|
|
|
FilteredList.FilterOptions := Value;
|
|
|
|
FFilterOptions := Value;
|
|
|
|
Update;
|
|
|
|
end;
|
|
|
|
|
2014-09-09 15:46:12 +03:00
|
|
|
{ ----------------------------------------------------------------------------
|
|
|
|
TParamFormat
|
|
|
|
---------------------------------------------------------------------------- }
|
|
|
|
|
|
|
|
constructor TParamFormat.Create;
|
|
|
|
begin
|
|
|
|
//...
|
|
|
|
end;
|
|
|
|
|
|
|
|
destructor TParamFormat.Destroy;
|
|
|
|
begin
|
|
|
|
//...
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
{ ----------------------------------------------------------------------------
|
|
|
|
TParamReference
|
|
|
|
---------------------------------------------------------------------------- }
|
|
|
|
|
|
|
|
constructor TParamReference.Create;
|
|
|
|
begin
|
|
|
|
FFormat := TParamFormat.Create;
|
|
|
|
end;
|
|
|
|
|
|
|
|
destructor TParamReference.Destroy;
|
|
|
|
begin
|
|
|
|
FFormat.Free;
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
{ ----------------------------------------------------------------------------
|
|
|
|
TParamDefiner
|
|
|
|
---------------------------------------------------------------------------- }
|
|
|
|
|
|
|
|
constructor TParamDefiner.Create;
|
|
|
|
begin
|
|
|
|
inherited;
|
2014-09-10 02:53:24 +03:00
|
|
|
FAbout := TComponentAbout.Create(ParamDefinerComponent_Name,ParamDefinerComponent_Version,ParamDefinerComponent_Copyright,ParamDefinerComponent_Author);
|
2014-09-09 15:46:12 +03:00
|
|
|
//FReferences := TParamReferences.Create;
|
|
|
|
end;
|
|
|
|
|
|
|
|
destructor TParamDefiner.Destroy;
|
|
|
|
begin
|
|
|
|
FAbout.Free;
|
|
|
|
// FReferences.Free;
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
2014-08-31 20:11:20 +03:00
|
|
|
end.
|