You've already forked lina-components
mirror of
https://bitbucket.org/Dennis07/lina-components.git
synced 2025-08-24 21:49:04 +02:00
Version 1.0 DEV 1.14b
Signed-off-by: Dennis07 <den.goehlert@t-online.de>
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -19,7 +19,7 @@ uses
|
||||
SysUtils, Classes, StdCtrls, Windows, Messages, Graphics, Controls, Printers,
|
||||
Contnrs,
|
||||
{ Andere Package-Units }
|
||||
uBase, uFileTools;
|
||||
uBase, uSysTools, uFileTools;
|
||||
|
||||
type
|
||||
{ Hilfsklassen }
|
||||
@@ -61,18 +61,29 @@ type
|
||||
FAbout: TComponentAbout;
|
||||
FHorizontalScrollBar: Boolean;
|
||||
FHorizontalScrollWidth: Integer;
|
||||
FWordWrap: Boolean;
|
||||
FItemHeights: array of Integer;
|
||||
{ Methoden }
|
||||
function GetTopIndex: Integer;
|
||||
procedure SetTopIndex(Value: Integer);
|
||||
procedure SetHorizontalScrollBar(Value: Boolean);
|
||||
procedure SetWordWrap(Value: Boolean);
|
||||
function GetItemHeights(Index: Integer): Integer;
|
||||
procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override;
|
||||
procedure UpdateItemHeights;
|
||||
public
|
||||
{ Public-Deklarationen }
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure ScrollTo(Index: Integer);
|
||||
property ItemHeights [Index: Integer]: Integer read GetItemHeights;
|
||||
published
|
||||
{ Published-Deklarationen }
|
||||
property About: TComponentAbout read FAbout;
|
||||
property TopIndex: Integer read GetTopIndex write SetTopIndex;
|
||||
property HorizontalScrollBar: Boolean read FHorizontalScrollBar write SetHorizontalScrollBar default False;
|
||||
property HorizontalScrollWidth: Integer read FHorizontalScrollWidth write FHorizontalScrollWidth default 48;
|
||||
property WordWrap: Boolean read FWordWrap write SetWordWrap default False;
|
||||
end;
|
||||
|
||||
TPaintMemo = class(TMemo)
|
||||
@@ -134,7 +145,7 @@ type
|
||||
property Default: TFont read FDefault write SetDefault;
|
||||
property Hovered: TFont read FHovered write SetHovered;
|
||||
property Pressed: TFont read FPressed write SetPressed;
|
||||
property Visited: TColor read FVisited write SetVisited default clHotlight;
|
||||
property Visited: TColor read FVisited write SetVisited default clPurple;
|
||||
end;
|
||||
|
||||
TShortcutLabel = class(TLabel)
|
||||
@@ -148,6 +159,8 @@ type
|
||||
FTarget: String;
|
||||
FState: TShortcutLabelState;
|
||||
FFont: TShortcutLabelFont;
|
||||
FHighlightVisited: Boolean;
|
||||
FStoreVisited: Boolean;
|
||||
{ Methoden }
|
||||
procedure SetFont(Value: TShortcutLabelFont);
|
||||
procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER;
|
||||
@@ -162,9 +175,12 @@ type
|
||||
property State: TShortcutLabelState read FState default slsDefault;
|
||||
published
|
||||
{ Published-Deklarationen }
|
||||
property Cursor default crHandPoint;
|
||||
property About: TComponentAbout read FAbout;
|
||||
property Target: String read FTarget write FTarget;
|
||||
property Font: TShortcutLabelFont read FFont write SetFont;
|
||||
property HighlightVisited: Boolean read FHighlightVisited write FHighlightVisited default True;
|
||||
property StoreVisited: Boolean read FStoreVisited write FStoreVisited default True;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
@@ -174,25 +190,20 @@ type
|
||||
|
||||
const
|
||||
{ Meta-Daten }
|
||||
CommandButtonComponent_Name = 'CommandButton';
|
||||
CommandButtonComponent_Version = 1.0;
|
||||
CommandButtonComponent_Copyright = 'Copyright � 2014';
|
||||
CommandButtonComponent_Version = '1.0';
|
||||
CommandButtonComponent_Copyright = 'Copyright � 2015';
|
||||
CommandButtonComponent_Author = 'Dennis G�hlert a.o.';
|
||||
|
||||
ScrollListBoxComponent_Name = 'ScrollListBox';
|
||||
ScrollListBoxComponent_Version = 1.0;
|
||||
ScrollListBoxComponent_Copyright = 'Copyright � 2014';
|
||||
ScrollListBoxComponent_Version = '1.0';
|
||||
ScrollListBoxComponent_Copyright = 'Copyright � 2015';
|
||||
ScrollListBoxComponent_Author = 'Dennis G�hlert a.o.';
|
||||
|
||||
PaintMemoComponent_Name = 'PaintMemo';
|
||||
PaintMemoComponent_Version = 1.0;
|
||||
PaintMemoComponent_Copyright = 'Copyright � 2014';
|
||||
PaintMemoComponent_Version = '1.0';
|
||||
PaintMemoComponent_Copyright = 'Copyright � 2015';
|
||||
PaintMemoComponent_Author = 'Dennis G�hlert a.o.';
|
||||
|
||||
|
||||
ShortcutLabelComponent_Name = 'ShortcutLabel';
|
||||
ShortcutLabelComponent_Version = 1.0;
|
||||
ShortcutLabelComponent_Copyright = 'Copyright � 2014';
|
||||
ShortcutLabelComponent_Version = '1.0';
|
||||
ShortcutLabelComponent_Copyright = 'Copyright � 2015';
|
||||
ShortcutLabelComponent_Author = 'Dennis G�hlert a.o.';
|
||||
{ Messages }
|
||||
BS_COMMANDLINK = $0000000E;
|
||||
@@ -243,7 +254,7 @@ end;
|
||||
constructor TCommandButton.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FAbout := TComponentAbout.Create(CommandButtonComponent_Name,CommandButtonComponent_Version,CommandButtonComponent_Copyright,CommandButtonComponent_Author);
|
||||
FAbout := TComponentAbout.Create(TCommandButton,CommandButtonComponent_Version,CommandButtonComponent_Copyright,CommandButtonComponent_Author);
|
||||
FShield := False;
|
||||
FIcon := TIcon.Create;
|
||||
FIcon.OnChange := FIconChange;
|
||||
@@ -286,9 +297,10 @@ end;
|
||||
constructor TScrollListBox.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FAbout := TComponentAbout.Create(ScrollListBoxComponent_Name,ScrollListBoxComponent_Version,ScrollListBoxComponent_Copyright,ScrollListBoxComponent_Author);
|
||||
FAbout := TComponentAbout.Create(TScrollListBox,ScrollListBoxComponent_Version,ScrollListBoxComponent_Copyright,ScrollListBoxComponent_Author);
|
||||
FHorizontalScrollBar := False;
|
||||
FHorizontalScrollWidth := 48;
|
||||
FWordWrap := False;
|
||||
end;
|
||||
|
||||
destructor TScrollListBox.Destroy;
|
||||
@@ -297,6 +309,16 @@ begin
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TScrollListBox.GetTopIndex: Integer;
|
||||
begin
|
||||
Result := SendMessage(Handle,LB_GETTOPINDEX,0,0);
|
||||
end;
|
||||
|
||||
procedure TScrollListBox.SetTopIndex(Value: Integer);
|
||||
begin
|
||||
ScrollTo(Value);
|
||||
end;
|
||||
|
||||
procedure TScrollListBox.SetHorizontalScrollBar(Value: Boolean);
|
||||
begin
|
||||
if Value = True then
|
||||
@@ -309,6 +331,67 @@ begin
|
||||
FHorizontalScrollBar := Value;
|
||||
end;
|
||||
|
||||
procedure TScrollListBox.SetWordWrap(Value: Boolean);
|
||||
begin
|
||||
if Value = True then
|
||||
begin
|
||||
Style := lbOwnerDrawVariable;
|
||||
end;
|
||||
FWordWrap := Value;
|
||||
RecreateWnd;
|
||||
end;
|
||||
|
||||
function TScrollListBox.GetItemHeights(Index: Integer): Integer;
|
||||
begin
|
||||
UpdateItemHeights;
|
||||
Result := FItemHeights[Index];
|
||||
end;
|
||||
|
||||
procedure TScrollListBox.DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState);
|
||||
var
|
||||
CountIndex: Integer;
|
||||
begin
|
||||
if WordWrap = True then
|
||||
begin
|
||||
Canvas.FillRect(Rect);
|
||||
if (Index < Count) and (Index >= TopIndex) then
|
||||
begin
|
||||
Perform(LB_SETITEMHEIGHT,Index,ItemHeights[Index]);
|
||||
Rect.Top := 0;
|
||||
for CountIndex := TopIndex to Index - 1 do
|
||||
begin
|
||||
Rect.Top := Rect.Top + FItemHeights[CountIndex];
|
||||
end;
|
||||
if UseRightToLeftAlignment = True then
|
||||
begin
|
||||
Rect.Right := Rect.Right - 2;
|
||||
end else
|
||||
begin
|
||||
Rect.Left := Rect.Left + 2;
|
||||
end;
|
||||
Rect.Height := ItemHeights[Index];
|
||||
Canvas.Pen.Color := clWhite;
|
||||
DrawText(Canvas.Handle,Items[Index],Length(Items[Index]),Rect,DT_WORDBREAK or DT_LEFT or DT_TOP or DT_NOPREFIX or DT_END_ELLIPSIS);
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
inherited;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TScrollListBox.UpdateItemHeights;
|
||||
var
|
||||
Index: Integer;
|
||||
Rect: TRect;
|
||||
begin
|
||||
SetLength(FItemHeights,Items.Count);
|
||||
for Index := 0 to Length(FItemHeights) - 1 do
|
||||
begin
|
||||
Rect := ItemRect(Index);
|
||||
FItemHeights[Index] := DrawText(Canvas.Handle,Items.Strings[Index],Length(Items.Strings[Index]),Rect,DT_CALCRECT or DT_WORDBREAK or DT_LEFT or DT_TOP or DT_NOPREFIX);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TScrollListBox.ScrollTo(Index: Integer);
|
||||
begin
|
||||
Perform(LB_SETTOPINDEX,Index,0);
|
||||
@@ -321,7 +404,7 @@ end;
|
||||
constructor TPaintMemo.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FAbout := TComponentAbout.Create(PaintMemoComponent_Name,PaintMemoComponent_Version,PaintMemoComponent_Copyright,PaintMemoComponent_Author);
|
||||
FAbout := TComponentAbout.Create(TPaintMemo,PaintMemoComponent_Version,PaintMemoComponent_Copyright,PaintMemoComponent_Author);
|
||||
FShowCaption := True;
|
||||
FCaptionFont := TFont.Create;
|
||||
FCaptionFont.Assign(Font);
|
||||
@@ -359,7 +442,7 @@ var
|
||||
begin
|
||||
inherited;
|
||||
FCaptionVisible := False;
|
||||
if (FShowCaption = True) and (Message.DC <> 0) and (not (csDestroying in ComponentState)) then
|
||||
if (FShowCaption = True) and (not (csDestroying in ComponentState)) then
|
||||
begin
|
||||
if ((Focused = False) or (CaptionMode = mcmAnyState)) and (Length(Text) < 1) then
|
||||
begin
|
||||
@@ -402,7 +485,7 @@ begin
|
||||
Pressed.OnChange := FontChange;
|
||||
Pressed.Color := clHotlight;
|
||||
Pressed.Style := [fsUnderline];
|
||||
Visited := clHotlight;
|
||||
Visited := clPurple;
|
||||
end;
|
||||
|
||||
destructor TShortcutLabelFont.Destroy;
|
||||
@@ -421,7 +504,7 @@ begin
|
||||
slsHovered: (FLabel as TLabel).Font.Assign(Hovered);
|
||||
slsPressed: (FLabel as TLabel).Font.Assign(Pressed);
|
||||
end;
|
||||
if TargetVisited(FLabel.Target) = True then
|
||||
if (FLabel.HighlightVisited = True) and (TargetVisited(FLabel.Target) = True) then
|
||||
begin
|
||||
(FLabel as TLabel).Font.Color := Visited;
|
||||
end;
|
||||
@@ -463,9 +546,11 @@ end;
|
||||
constructor TShortcutLabel.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FAbout := TComponentAbout.Create(ShortcutLabelComponent_Name,ShortcutLabelComponent_Version,ShortcutLabelComponent_Copyright,ShortcutLabelComponent_Author);
|
||||
FAbout := TComponentAbout.Create(TShortcutLabel,ShortcutLabelComponent_Version,ShortcutLabelComponent_Copyright,ShortcutLabelComponent_Author);
|
||||
FState := slsDefault;
|
||||
FFont := TShortcutLabelFont.Create(Self);
|
||||
FHighlightVisited := True;
|
||||
FStoreVisited := True;
|
||||
Cursor := crHandPoint;
|
||||
RegisterToList;
|
||||
end;
|
||||
@@ -486,10 +571,13 @@ begin
|
||||
if Length(Target) <> 0 then
|
||||
begin
|
||||
ExecuteFile(Target);
|
||||
VisitedTargets.Add(Target);
|
||||
for Index := 0 to ShortcutLabels.Count - 1 do
|
||||
if StoreVisited = True then
|
||||
begin
|
||||
(ShortcutLabels.Items[Index] as TShortcutLabel).Font.Update;
|
||||
VisitedTargets.Add(Target);
|
||||
for Index := 0 to ShortcutLabels.Count - 1 do
|
||||
begin
|
||||
(ShortcutLabels.Items[Index] as TShortcutLabel).Font.Update;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@@ -513,7 +601,7 @@ procedure TShortcutLabel.UnregisterFromList;
|
||||
begin
|
||||
if ShortcutLabels.Count = 1 then
|
||||
begin
|
||||
ShortcutLabels.Free;
|
||||
FreeAndNil(ShortcutLabels);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@@ -14,28 +14,30 @@ interface
|
||||
|
||||
uses
|
||||
{ Standard-Units }
|
||||
SysUtils, Dialogs;
|
||||
SysUtils, Classes, Dialogs, uSysTools;
|
||||
|
||||
type
|
||||
TComponentAbout = class
|
||||
private
|
||||
{ Private-Deklarationen }
|
||||
FComponent: ShortString;
|
||||
FVersion: Single;
|
||||
FComponent: TComponentClass;
|
||||
FName: TComponentName;
|
||||
FVersion: ShortString;
|
||||
FAuthor: ShortString;
|
||||
FCopyright: ShortString;
|
||||
FHomepage: ShortString;
|
||||
protected
|
||||
{ Protected-Deklarationen }
|
||||
property Component: TComponentClass read FComponent write FComponent;
|
||||
published
|
||||
property Component: ShortString read FComponent;
|
||||
property Version: Single read FVersion;
|
||||
property Name: TComponentName read FName;
|
||||
property Version: ShortString read FVersion;
|
||||
property Copyright: ShortString read FCopyright;
|
||||
property Author: ShortString read FAuthor;
|
||||
property Homepage: ShortString read FHomepage;
|
||||
public
|
||||
{ Public-Deklarationen }
|
||||
constructor Create(Comp: ShortString = ''; Ver: Single = 1.0;
|
||||
constructor Create(Component: TComponentClass; Ver: ShortString = '1.0';
|
||||
Copy: ShortString = ''; Auth: ShortString = ''; Home: ShortString = '');
|
||||
{ �ber-Dialog }
|
||||
procedure AboutDlg;
|
||||
@@ -47,10 +49,12 @@ const
|
||||
|
||||
implementation
|
||||
|
||||
constructor TComponentAbout.Create(Comp: ShortString = ''; Ver: Single = 1.0;
|
||||
Copy: ShortString = ''; Auth: ShortString = ''; Home: ShortString = '');
|
||||
constructor TComponentAbout.Create(Component: TComponentClass;
|
||||
Ver: ShortString = '1.0'; Copy: ShortString = ''; Auth: ShortString = '';
|
||||
Home: ShortString = '');
|
||||
begin
|
||||
FComponent := Comp;
|
||||
FComponent := Component;
|
||||
FName := ExtractClassName(Component.ClassName);
|
||||
FVersion := Ver;
|
||||
FCopyright := Copy;
|
||||
FAuthor := Auth;
|
||||
@@ -68,8 +72,8 @@ begin
|
||||
{$ENDIF}
|
||||
About_Title,
|
||||
{ ---------------------------------- }
|
||||
Component + ' v'
|
||||
+ FloatToStr(Version) + sLineBreak
|
||||
Name + ' v'
|
||||
+ Version + sLineBreak
|
||||
+ Copyright + ' ' + Author + sLineBreak
|
||||
+ Homepage,
|
||||
{ ---------------------------------- }
|
||||
|
@@ -132,9 +132,8 @@ type
|
||||
|
||||
const
|
||||
{ Meta-Daten }
|
||||
CalculatorComponent_Name = 'Calculator';
|
||||
CalculatorComponent_Version = 1.0;
|
||||
CalculatorComponent_Copyright = 'Copyright � 2014';
|
||||
CalculatorComponent_Version = '1.0';
|
||||
CalculatorComponent_Copyright = 'Copyright � 2015';
|
||||
CalculatorComponent_Author = 'Dennis G�hlert a.o.';
|
||||
{ Sonderzeichen f�r Ausdr�cke }
|
||||
CalcSeperators = ['.',','];
|
||||
@@ -219,7 +218,7 @@ end;
|
||||
constructor TCalculator.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FAbout := TComponentAbout.Create(CalculatorComponent_Name,CalculatorComponent_Version,CalculatorComponent_Copyright,CalculatorComponent_Author);
|
||||
FAbout := TComponentAbout.Create(TCalculator,CalculatorComponent_Version,CalculatorComponent_Copyright,CalculatorComponent_Author);
|
||||
FExpression := '';
|
||||
FValue := 0;
|
||||
FConstants := TCalculatorConstants.Create(TCalculatorConstant,Self);
|
||||
|
@@ -104,9 +104,8 @@ type
|
||||
|
||||
const
|
||||
{ Meta-Daten }
|
||||
ContextMenuComponent_Name = 'ContextMenu';
|
||||
ContextMenuComponent_Version = 1.0;
|
||||
ContextMenuComponent_Copyright = 'Copyright � 2014';
|
||||
ContextMenuComponent_Version = '1.0';
|
||||
ContextMenuComponent_Copyright = 'Copyright � 2015';
|
||||
ContextMenuComponent_Author = 'Dennis G�hlert a.o.';
|
||||
{ Sonstige }
|
||||
ContextRegPathShell = '\shell';
|
||||
@@ -182,7 +181,7 @@ end;
|
||||
constructor TContextMenu.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FAbout := TComponentAbout.Create(ContextMenuComponent_Name,ContextMenuComponent_Version,ContextMenuComponent_Copyright,ContextMenuComponent_Author);
|
||||
FAbout := TComponentAbout.Create(TContextMenu,ContextMenuComponent_Version,ContextMenuComponent_Copyright,ContextMenuComponent_Author);
|
||||
FItems := TContextMenuItems.Create(TContextMenuItem);
|
||||
FExt := '*';
|
||||
FAutoLoad := False;
|
||||
|
@@ -456,24 +456,20 @@ type
|
||||
|
||||
const
|
||||
{ Meta-Daten }
|
||||
SplashScreenComponent_Name = 'SplashScreen';
|
||||
SplashScreenComponent_Version = 1.0;
|
||||
SplashScreenComponent_Copyright = 'Copyright � 2014';
|
||||
SplashScreenComponent_Version = '1.0';
|
||||
SplashScreenComponent_Copyright = 'Copyright � 2015';
|
||||
SplashScreenComponent_Author = 'Dennis G�hlert a.o.';
|
||||
|
||||
ProgressBarManagerComponent_Name = 'ProgressBarManager';
|
||||
ProgressBarManagerComponent_Version = 1.0;
|
||||
ProgressBarManagerComponent_Copyright = 'Copyright � 2014';
|
||||
ProgressBarManagerComponent_Version = '1.0';
|
||||
ProgressBarManagerComponent_Copyright = 'Copyright � 2015';
|
||||
ProgressBarManagerComponent_Author = 'Dennis G�hlert a.o.';
|
||||
|
||||
ListBoxManagerComponent_Name = 'ListBoxManager';
|
||||
ListBoxManagerComponent_Version = 1.0;
|
||||
ListBoxManagerComponent_Copyright = 'Copyright � 2014';
|
||||
ListBoxManagerComponent_Version = '1.0';
|
||||
ListBoxManagerComponent_Copyright = 'Copyright � 2015';
|
||||
ListBoxManagerComponent_Author = 'Dennis G�hlert a.o.';
|
||||
|
||||
ParamDefinerComponent_Name = 'ParamDefiner';
|
||||
ParamDefinerComponent_Version = 1.0;
|
||||
ParamDefinerComponent_Copyright = 'Copyright � 2014';
|
||||
ParamDefinerComponent_Version = '1.0';
|
||||
ParamDefinerComponent_Copyright = 'Copyright � 2015';
|
||||
ParamDefinerComponent_Author = 'Dennis G�hlert a.o.';
|
||||
|
||||
implementation
|
||||
@@ -1047,7 +1043,7 @@ begin
|
||||
FAnimationSpeed := 10;
|
||||
FVisible := False;
|
||||
|
||||
FAbout := TComponentAbout.Create(SplashScreenComponent_Name,SplashScreenComponent_Version,SplashScreenComponent_Copyright,SplashScreenComponent_Author);
|
||||
FAbout := TComponentAbout.Create(TSplashScreen,SplashScreenComponent_Version,SplashScreenComponent_Copyright,SplashScreenComponent_Author);
|
||||
FSplashForm := TSplashForm.Create;
|
||||
FSplashForm.FormObject.OnShow := FormObjectShow;
|
||||
FSplashForm.FormObject.OnHide := FormObjectHide;
|
||||
@@ -1400,7 +1396,7 @@ end;
|
||||
constructor TProgressBarManager.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FAbout := TComponentAbout.Create(ProgressBarManagerComponent_Name,ProgressBarManagerComponent_Version,ProgressBarManagerComponent_Copyright,ProgressBarManagerComponent_Author);
|
||||
FAbout := TComponentAbout.Create(TProgressBarManager,ProgressBarManagerComponent_Version,ProgressBarManagerComponent_Copyright,ProgressBarManagerComponent_Author);
|
||||
FMode := pmmNone;
|
||||
|
||||
Update;
|
||||
@@ -1474,7 +1470,7 @@ end;
|
||||
constructor TListBoxManager.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FAbout := TComponentAbout.Create(ListBoxManagerComponent_Name,ListBoxManagerComponent_Version,ListBoxManagerComponent_Copyright,ListBoxManagerComponent_Author);
|
||||
FAbout := TComponentAbout.Create(TListBoxManager,ListBoxManagerComponent_Version,ListBoxManagerComponent_Copyright,ListBoxManagerComponent_Author);
|
||||
FMode := lmmNone;
|
||||
FFilterOptions := [sfoCaseSensitive,sfoForceTrim,sfoDefaultVisible];
|
||||
FilteredList := TFilteredStringList.Create;
|
||||
@@ -1809,7 +1805,7 @@ end;
|
||||
constructor TParamDefiner.Create;
|
||||
begin
|
||||
inherited;
|
||||
FAbout := TComponentAbout.Create(ParamDefinerComponent_Name,ParamDefinerComponent_Version,ParamDefinerComponent_Copyright,ParamDefinerComponent_Author);
|
||||
FAbout := TComponentAbout.Create(TParamDefiner,ParamDefinerComponent_Version,ParamDefinerComponent_Copyright,ParamDefinerComponent_Author);
|
||||
FReferences := TParamReferences.Create(TParamReference);
|
||||
end;
|
||||
|
||||
|
@@ -261,9 +261,8 @@ type
|
||||
|
||||
const
|
||||
{ Meta-Daten }
|
||||
LocalizationManagerComponent_Name = 'LocalizationManager';
|
||||
LocalizationManagerComponent_Version = 1.0;
|
||||
LocalizationManagerComponent_Copyright = 'Copyright � 2014';
|
||||
LocalizationManagerComponent_Version = '1.0';
|
||||
LocalizationManagerComponent_Copyright = 'Copyright � 2015';
|
||||
LocalizationManagerComponent_Author = 'Dennis G�hlert a.o.';
|
||||
|
||||
implementation
|
||||
@@ -1128,7 +1127,7 @@ end;
|
||||
constructor TLocalizationManager.Create(AOwnder: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FAbout := TComponentAbout.Create(LocalizationManagerComponent_Name,LocalizationManagerComponent_Version,LocalizationManagerComponent_Copyright,LocalizationManagerComponent_Author);
|
||||
FAbout := TComponentAbout.Create(TLocalizationManager,LocalizationManagerComponent_Version,LocalizationManagerComponent_Copyright,LocalizationManagerComponent_Author);
|
||||
FLocalizations := TLocalizations.Create(TLocalization,Self);
|
||||
FData := TLocalizationData.Create(Self);
|
||||
FReferences := TLocalizationReferences.Create(TLocalizationReference,Self);
|
||||
|
@@ -175,9 +175,8 @@ type
|
||||
|
||||
const
|
||||
{ Meta-Daten }
|
||||
ScriptManagerComponent_Name = 'ScriptManager';
|
||||
ScriptManagerComponent_Version = 1.0;
|
||||
ScriptManagerComponent_Copyright = 'Copyright � 2014';
|
||||
ScriptManagerComponent_Version = '1.0';
|
||||
ScriptManagerComponent_Copyright = 'Copyright � 2015';
|
||||
ScriptManagerComponent_Author = 'Dennis G�hlert a.o.';
|
||||
{ Fehlermeldungen }
|
||||
Error_MissingReturnTarget = 'Missing log-return target';
|
||||
@@ -287,7 +286,7 @@ end;
|
||||
constructor TScriptManager.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FAbout := TComponentAbout.Create(ScriptManagerComponent_Name,ScriptManagerComponent_Version,ScriptManagerComponent_Copyright,ScriptManagerComponent_Author);
|
||||
FAbout := TComponentAbout.Create(TScriptManager,ScriptManagerComponent_Version,ScriptManagerComponent_Copyright,ScriptManagerComponent_Author);
|
||||
//ReturnMode := srNone; Durch DEFAULT festgelegt!
|
||||
//ReturnStyle := srSimple; Durch DEFAULT festgelegt!
|
||||
SecureMode := True;
|
||||
@@ -677,11 +676,11 @@ end;
|
||||
|
||||
procedure TScriptManager.PS_About;
|
||||
begin
|
||||
MessageDlg(ScriptManagerComponent_Name + ' Component v'
|
||||
+ FloatToStr(ScriptManagerComponent_Version) + sLineBreak
|
||||
MessageDlg(About.Name + ' Component v'
|
||||
+ About.Version + sLineBreak
|
||||
+ 'For: Borland Delphi' + sLineBreak
|
||||
+ ScriptManagerComponent_Copyright + ' by '
|
||||
+ ScriptManagerComponent_Author + sLineBreak
|
||||
+ About.Copyright + ' by '
|
||||
+ About.Author + sLineBreak
|
||||
+ 'Requires and uses: RemObjects PascalScript component library',
|
||||
mtInformation,[mbOK],0);
|
||||
end;
|
||||
|
@@ -114,18 +114,15 @@ const
|
||||
PS_NONE = 'None';
|
||||
PS_UNKNOWN = 'Unknown';
|
||||
{ Meta-Daten }
|
||||
BatteryComponent_Name = 'Battery';
|
||||
BatteryComponent_Version = 1.0;
|
||||
BatteryComponent_Version = '1.0';
|
||||
BatteryComponent_Copyright = 'Copyright � 2014';
|
||||
BatteryComponent_Author = 'Dennis G�hlert a.o.';
|
||||
|
||||
CursorFixComponent_Name = 'CursorFix';
|
||||
CursorFixComponent_Version = 1.0;
|
||||
CursorFixComponent_Version = '1.0';
|
||||
CursorFixComponent_Copyright = 'Copyright � 2014';
|
||||
CursorFixComponent_Author = 'Dennis G�hlert a.o.';
|
||||
|
||||
ProcessManagerComponent_Name = 'ProcessManager';
|
||||
ProcessManagerComponent_Version = 1.0;
|
||||
ProcessManagerComponent_Version = '1.0';
|
||||
ProcessManagerComponent_Copyright = 'Copyright � 2014';
|
||||
ProcessManagerComponent_Author = 'Dennis G�hlert a.o.';
|
||||
|
||||
@@ -160,7 +157,7 @@ end;
|
||||
constructor TBattery.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FAbout := TComponentAbout.Create(BatteryComponent_Name,BatteryComponent_Version,BatteryComponent_Copyright,BatteryComponent_Author);
|
||||
FAbout := TComponentAbout.Create(TBattery,BatteryComponent_Version,BatteryComponent_Copyright,BatteryComponent_Author);
|
||||
end;
|
||||
|
||||
destructor TBattery.Destroy;
|
||||
@@ -239,7 +236,7 @@ constructor TCursorFix.Create(AOwner: TComponent);
|
||||
{$ENDIF}
|
||||
begin
|
||||
inherited;
|
||||
FAbout := TComponentAbout.Create(CursorFixComponent_Name,CursorFixComponent_Version,CursorFixComponent_Copyright,CursorFixComponent_Author);
|
||||
FAbout := TComponentAbout.Create(TCursorFix,CursorFixComponent_Version,CursorFixComponent_Copyright,CursorFixComponent_Author);
|
||||
{$IFDEF NO_CURSOR}
|
||||
CursorHandle := Screen.Cursors[crHandPoint];
|
||||
Screen.Cursors[crHandPoint] := LoadCursor(0,IDC_HAND);
|
||||
@@ -273,7 +270,7 @@ end;
|
||||
constructor TProcessManager.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FAbout := TComponentAbout.Create(ProcessManagerComponent_Name,ProcessManagerComponent_Version,ProcessManagerComponent_Copyright,ProcessManagerComponent_Author);
|
||||
FAbout := TComponentAbout.Create(TProcessManager,ProcessManagerComponent_Version,ProcessManagerComponent_Copyright,ProcessManagerComponent_Author);
|
||||
FNames := TStringList.Create;
|
||||
TimerObject := TTimer.Create(Self);
|
||||
FRefreshMode := prNone;
|
||||
|
@@ -299,6 +299,10 @@ type
|
||||
function SubPropIsType(Instance: TObject; const PropName: String; TypeKind: TTypeKind): Boolean;
|
||||
function SubPropType(Instance: TObject; const PropName: String): TTypeKind; overload;
|
||||
{ Sonstige }
|
||||
function ExtractClassName(FullClassName: String; CaseSensitive: Boolean = True): String;
|
||||
function CountLines(S: String): Integer;
|
||||
function Wrappable(S: String; Font: TFont; MaxWidth: Integer): Boolean; overload;
|
||||
function Wrappable(S: String; Canvas: TCanvas; MaxWidth: Integer): Boolean; overload;
|
||||
function CharEncoding(EncodingClass: TEncoding): TCharEncoding;
|
||||
function EncodingClass(CharEncoding: TCharEncoding): TEncoding;
|
||||
function SecToTime(const Sec: Cardinal): TTime;
|
||||
@@ -326,7 +330,9 @@ type
|
||||
const
|
||||
Spaces = [#9,#10,#13,#32,#160];
|
||||
Numbers = ['0'..'9'];
|
||||
Letters = ['A'..'Z','a'..'z'];
|
||||
UpperCaseLetters = ['A'..'Z'];
|
||||
LowerCaseLetters = ['a'..'z'];
|
||||
Letters = UpperCaseLetters + LowerCaseLetters;
|
||||
Operators = ['+','-','*','/'];
|
||||
SE_DEBUG_NAME = 'SeDebugPrivilege';
|
||||
|
||||
@@ -1137,6 +1143,60 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function ExtractClassName(FullClassName: String; CaseSensitive: Boolean = True): String;
|
||||
begin
|
||||
if ((FullClassName[1] = 'T') or ((CaseSensitive = False) and (FullClassName[1] = 't'))) and ((FullClassName[2] in UppercaseLetters) or (CaseSensitive = False)) then
|
||||
begin
|
||||
Result := Copy(FullClassName,2,Length(FullClassName) - 1);
|
||||
end else
|
||||
begin
|
||||
Result := FullClassName;
|
||||
end;
|
||||
end;
|
||||
|
||||
function CountLines(S: String): Integer;
|
||||
var
|
||||
Current: PChar;
|
||||
begin
|
||||
if Length(S) = 0 then
|
||||
begin
|
||||
Result := 0;
|
||||
Exit;
|
||||
end;
|
||||
Result := 1;
|
||||
Current := PChar(S);
|
||||
while Current^ <> #0 do
|
||||
begin
|
||||
if Current^ = #13 then
|
||||
begin
|
||||
if (Current + 1)^ = #10 then
|
||||
begin
|
||||
Inc(Result);
|
||||
Inc(Current);
|
||||
end;
|
||||
end;
|
||||
Inc(Current);
|
||||
end;
|
||||
end;
|
||||
|
||||
function Wrappable(S: String; Canvas: TCanvas; MaxWidth: Integer): Boolean; overload;
|
||||
begin
|
||||
Result := (Canvas.TextWidth(S) <= MaxWidth);
|
||||
end;
|
||||
|
||||
function Wrappable(S: String; Font: TFont; MaxWidth: Integer): Boolean; overload;
|
||||
var
|
||||
Canvas: TCanvas;
|
||||
begin
|
||||
Canvas := TCanvas.Create;
|
||||
try
|
||||
Canvas.Font.Assign(Font);
|
||||
Result := Wrappable(S,Canvas,MaxWidth);
|
||||
finally
|
||||
Canvas.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
function CharEncoding(EncodingClass: TEncoding): TCharEncoding;
|
||||
begin
|
||||
if EncodingClass = TEncoding.ANSI then
|
||||
|
@@ -106,9 +106,8 @@ const
|
||||
WP_CALL: TWebProtocol = 'callto:';
|
||||
WP_MAIL: TWebProtocol = 'mailto:';
|
||||
{ Meta-Daten }
|
||||
DownloadComponent_Name = 'Download';
|
||||
DownloadComponent_Version = 1.0;
|
||||
DownloadComponent_Copyright = 'Copyright � 2014';
|
||||
DownloadComponent_Version = '1.0';
|
||||
DownloadComponent_Copyright = 'Copyright � 2015';
|
||||
DownloadComponent_Author = 'Dennis G�hlert a.o.';
|
||||
|
||||
implementation
|
||||
@@ -358,7 +357,7 @@ end;
|
||||
constructor TDownload.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FAbout := TComponentAbout.Create(DownloadComponent_Name,DownloadComponent_Version,DownloadComponent_Copyright,DownloadComponent_Author);
|
||||
FAbout := TComponentAbout.Create(TDownload,DownloadComponent_Version,DownloadComponent_Copyright,DownloadComponent_Author);
|
||||
idHTTPObject := TidHTTP.Create(Self);
|
||||
idHTTPObject.HandleRedirects := True;
|
||||
idHTTPObject.OnWork := idHTTPObjectWork;
|
||||
|
Reference in New Issue
Block a user