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.11g
Signed-off-by: Dennis07 <den.goehlert@t-online.de>
This commit is contained in:
@@ -14,6 +14,7 @@ versions installed:
|
||||
- Delphi XE4
|
||||
- Delphi XE5
|
||||
- Delphi XE6
|
||||
- Delphi XE7
|
||||
|
||||
You also need to have a version of the following packages installed
|
||||
to fully make use of the features of Lina Components:
|
||||
@@ -27,7 +28,7 @@ to fully make use of the features of Lina Components:
|
||||
|
||||
**) This is the recommended version under which the official
|
||||
repository of Lina Components is being developed. The code might
|
||||
also run with older versions, but that might cause errors or
|
||||
also run with other releases, but that might cause errors or
|
||||
limitations.
|
||||
|
||||
== Obtainment =====================================================
|
||||
|
@@ -1,4 +1,4 @@
|
||||
These statistics cover the official repository of Lina Components.
|
||||
|
||||
Total lines of code (LoC): 6800+
|
||||
Total lines of code (LoC): 7300+
|
||||
Total visual components (VC): 15
|
@@ -58,6 +58,7 @@ contains
|
||||
uVirtObj in '..\..\Source\uVirtObj.pas',
|
||||
uAdvCtrls in '..\..\Source\uAdvCtrls.pas',
|
||||
uWebCtrls in '..\..\Source\uWebCtrls.pas',
|
||||
uFileCtrls in '..\..\Source\uFileCtrls.pas';
|
||||
uFileCtrls in '..\..\Source\uFileCtrls.pas',
|
||||
uInit in '..\..\Source\uInit.pas';
|
||||
|
||||
end.
|
||||
|
@@ -129,6 +129,7 @@
|
||||
<DCCReference Include="..\..\Source\uAdvCtrls.pas"/>
|
||||
<DCCReference Include="..\..\Source\uWebCtrls.pas"/>
|
||||
<DCCReference Include="..\..\Source\uFileCtrls.pas"/>
|
||||
<DCCReference Include="..\..\Source\uInit.pas"/>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
|
@@ -1,47 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject>
|
||||
<Transactions>
|
||||
<Transaction>1899.12.30 00:00:00.000.576,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uSysTools.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.592,=C:\Users\Dennis\Documents\RAD Studio\Projekte\LinaComponents\uFileTools.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.325,=dbrtl.dcp</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.204,C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\uFileCtrls.pas=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uFileCtrls.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.508,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uBase.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.650,C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uSysCtrls.pas=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uBattery.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.576,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uSysTools.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.674,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.837,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.411,C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Unit1.pas=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uAdvCtrls.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.681,C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Resource\Lina.rc=</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.809,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Resource\Lina.rc</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.650,C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uBattery.pas=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uSysCtrls.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.621,=C:\Users\Dennis\Documents\RAD Studio\Projekte\LinaComponents\uLinaTest.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.143,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Untitled1.htm</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.414,C:\Users\Dennis\Documents\RAD Studio\Projekte\LinaComponents\uLinaTest.pas=</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.577,=C:\Users\Dennis\Documents\RAD Studio\Projekte\LinaComponents\uBattery.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.556,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uLocalMgr.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.648,=C:\Users\Dennis\Documents\RAD Studio\Projekte\LinaComponents\uScriptMgr.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.518,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uBattery.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.681,C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Resource\Lina.rc=</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.325,=dbrtl.dcp</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.809,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Resource\Lina.rc</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.932,C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\uFileCtrls.pas=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.592,=C:\Users\Dennis\Documents\RAD Studio\Projekte\LinaComponents\uFileTools.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.537,C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Untitled1.htm=C:\Users\Dennis G\Documents\CodeQuality.htm</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.414,C:\Users\Dennis\Documents\RAD Studio\Projekte\LinaComponents\uLinaTest.pas=</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.143,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Untitled1.htm</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.633,C:\Users\Dennis\Documents\RAD Studio\Projekte\LinaComponents\LINA_D_XE5.dproj=C:\Users\Dennis\Documents\RAD Studio\Projekte\Package1.dproj</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.577,=C:\Users\Dennis\Documents\RAD Studio\Projekte\LinaComponents\uBattery.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.537,C:\Users\Dennis G\Documents\CodeQuality.htm=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Untitled1.htm</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.318,=vcl.dcp</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.896,C:\Users\Dennis G\Documents\CodeQuality.htm=</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.556,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uLocalMgr.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.621,=C:\Users\Dennis\Documents\RAD Studio\Projekte\LinaComponents\uLinaTest.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.204,C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uFileCtrls.pas=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\uFileCtrls.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.412,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.196,=rtl.dcp</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.686,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\uSysTools.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.791,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.971,=IndySystem.dcp</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.584,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uVirtObj.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.196,=rtl.dcp</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.555,=C:\Users\Dennis\Documents\RAD Studio\Projekte\LinaComponents\uBase.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.525,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uCrypt.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.584,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uVirtObj.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.118,=IndyCore.dcp</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.535,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uFileTools.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.582,C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uWebCtrls.pas=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.672,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\uFrmCtrls.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.633,=C:\Users\Dennis\Documents\RAD Studio\Projekte\LinaComponents\uLocalMgr.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.546,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uFrmCtrls.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.411,C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uAdvCtrls.pas=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.686,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\uSysTools.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.672,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\uFrmCtrls.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.633,C:\Users\Dennis\Documents\RAD Studio\Projekte\Package1.dproj=C:\Users\Dennis\Documents\RAD Studio\Projekte\LinaComponents\LINA_D_XE5.dproj</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.932,C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Unit1.pas=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\uFileCtrls.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.173,C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Unit1.pas=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uInit.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.412,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.675,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.791,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.837,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.045,=IndyProtocols.dcp</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.525,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uCrypt.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.582,C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Unit1.pas=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uWebCtrls.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.857,=PascalScript_Core_D19.dcp</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.566,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uScriptMgr.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.045,=IndyProtocols.dcp</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.799,=PascalScript_Core_D19.dcp</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.566,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uScriptMgr.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.546,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uFrmCtrls.pas</Transaction>
|
||||
</Transactions>
|
||||
<ProjectSortOrder AutoSort="0" SortType="0">
|
||||
<File Path="..\..\..\LinaComponents"/>
|
||||
@@ -63,6 +65,7 @@
|
||||
<File Path="..\..\Source\uFileCtrls.pas"/>
|
||||
<File Path="..\..\Source\uFileTools.pas"/>
|
||||
<File Path="..\..\Source\uFrmCtrls.pas"/>
|
||||
<File Path="..\..\Source\uInit.pas"/>
|
||||
<File Path="..\..\Source\uLocalMgr.pas"/>
|
||||
<File Path="..\..\Source\uScriptMgr.pas"/>
|
||||
<File Path="..\..\Source\uSysCtrls.pas"/>
|
||||
|
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.
BIN
Source/Compiled/uInit.dcu
Normal file
BIN
Source/Compiled/uInit.dcu
Normal file
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.
@@ -6,6 +6,12 @@ unit uAdvCtrls;
|
||||
/// (c) 2014 Dennis G�hlert a.o. ///
|
||||
//////////////////////////////////////
|
||||
|
||||
{$IFNDEF MSWINDOWS}
|
||||
{$IFDEF WARN_INCOMPATIBLEOS}
|
||||
{$MESSAGE ERROR 'The "uAdvCtrls" unit is only available under MS-Windows OS'}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
110
Source/uBase.pas
110
Source/uBase.pas
@@ -6,57 +6,15 @@ unit uBase;
|
||||
/// (c) 2014 Dennis G�hlert a.o. ///
|
||||
//////////////////////////////////////
|
||||
|
||||
{$IF CompilerVersion < 15.0}
|
||||
{ Fr�here Delphi-Versionen als Delphi 7 werden nicht (offiziell)
|
||||
unterst�tzt. }
|
||||
{$MESSAGE ERROR 'Lina Components requires Delphi 7 or higher'}
|
||||
{$IFEND}
|
||||
{$IF CompilerVersion < 18.5}
|
||||
{ Unter fr�heren Delphi-Versionen als 2007 gab es (offiziell) noch keine
|
||||
Unterst�tzung f�r Windows-Vista-spezifische funktionen wie die TaskDialog-
|
||||
Komponente oder einige Funktionen.
|
||||
Damit dies nicht zu Problemen f�hrt, geht der Compiler darauf mithilfe
|
||||
dieser Direktive ein. }
|
||||
{$DEFINE NO_VISTA}
|
||||
{$IFEND}
|
||||
{$IF CompilerVersion < 21.0}
|
||||
{ Unter fr�heren Delphi-Versionen als 2010 gab es ein Problem mit dem
|
||||
"crHandPoint" cursor, sodass dieser nicht korrekt unter Windows Vista oder
|
||||
h�her dargestellt wurde, sondern stattdessen im alten Windows-Look.
|
||||
Bei �lteren Delphi-Versionen als 2010 steht deswegen eine Pseudo-
|
||||
Komponente zur Behebung dieses Problems zur Verf�gung. }
|
||||
{$DEFINE NO_HANDPOINT}
|
||||
{$IFEND}
|
||||
{$IF CompilerVersion < 20.0}
|
||||
{ Unter fr�heren Delphi-Versionen als 2009 war die Nutzung generischer
|
||||
Datentypen (Generics) nicht m�glich. Da es ohne diese nahezu unm�glich
|
||||
scheint, typisierte Objekte, wie zum Beispiel typisierte TObjectList's
|
||||
zu deklarieren, fallen diese Deklarationen unter fr�heren Delphi-Versionen
|
||||
weg. Dies kann eventuell zu kompatibilit�tsproblemen zwischen
|
||||
unterschiedlichen Nutzern dieser Komponenten f�hren, l�sst sich aber nicht
|
||||
vermeiden. }
|
||||
{$DEFINE NO_GENERIC}
|
||||
{$IFEND}
|
||||
{$IF CompilerVersion < 20.0}
|
||||
{ Unter fr�heren Delphi-Versionen als 2009 entsprach der String-Typenalias
|
||||
dem AnsiString-Typen. Da es gegebenfalls bei manchen externen (zB. OS-
|
||||
Spezifischen) Klassen zu Kompatibilit�tsproblemen kommmen k�nnte, wird
|
||||
hier eine �berpr�fung der Unicode-Unterst�tzung durchgef�hrt.
|
||||
Zu beachten ist jedoch, dass Delphi 2009 und h�her AnsiStrings implizit
|
||||
in UnicodeStrings umwandelt und umgekehrt (sofern m�glich). }
|
||||
{$DEFINE NO_UNICODE}
|
||||
{$IFEND}
|
||||
{$DEFINE ADDSPLASHENTRY}
|
||||
{$DEFINE ADDABOUTENTRY}
|
||||
|
||||
|
||||
interface
|
||||
|
||||
{ Dies ist die Basis-Unit f�r die Lina-Komponenten bzw. Methoden und Klassen }
|
||||
{ Dies ist die Basis-Unit f�r die Lina-Komponenten bzw. Methoden und Klassen.
|
||||
Diese Unit soll nur indirekt �ber Lina-Komponenten und ggf. Klassen
|
||||
eingebunden werden! }
|
||||
|
||||
uses
|
||||
{ Standard-Units }
|
||||
SysUtils, Classes, Dialogs, Graphics, ToolsAPI;
|
||||
SysUtils, Dialogs;
|
||||
|
||||
type
|
||||
TComponentAbout = class
|
||||
@@ -83,59 +41,12 @@ type
|
||||
procedure AboutDlg;
|
||||
end;
|
||||
|
||||
procedure RegisterPackageOnSplash;
|
||||
procedure RegisterPackageOnAbout;
|
||||
procedure UnregisterPackageOnAbout;
|
||||
|
||||
const
|
||||
ComponentsPage = 'Lina';
|
||||
About_Title = 'About...';
|
||||
Package_Name = 'Lina Components';
|
||||
Package_Description = 'Components and code library for Delphi' + sLineBreak + '� 2014 Dennis G�hlert a.o.';
|
||||
Package_License = 'Mozilla Public License (MPL) 2.0';
|
||||
Package_SKU = '(Dev-Preview)';
|
||||
|
||||
var
|
||||
PluginIndex: Integer = -1;
|
||||
AboutBitmap: TBitmap;
|
||||
|
||||
implementation
|
||||
|
||||
procedure RegisterPackageOnSplash;
|
||||
var
|
||||
SplashBitmap: TBitmap;
|
||||
begin
|
||||
SplashBitmap := TBitmap.Create;
|
||||
try
|
||||
SplashBitmap.LoadFromResourceName(HInstance,'LINA');
|
||||
(ToolsAPI.SplashScreenServices as IOTASplashScreenServices).AddPluginBitmap(
|
||||
Package_Name,SplashBitmap.Handle,False,Package_License,Package_SKU);
|
||||
finally
|
||||
SplashBitmap.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure RegisterPackageOnAbout;
|
||||
begin
|
||||
AboutBitmap := TBitmap.Create;
|
||||
try
|
||||
AboutBitmap.LoadFromResourceName(HInstance,'LINA');
|
||||
PluginIndex := (ToolsAPI.BorlandIDEServices as IOTAAboutBoxServices120).AddPluginInfo(
|
||||
Package_Name,Package_Description,AboutBitmap.Handle,False,Package_License,Package_SKU);
|
||||
except
|
||||
AboutBitmap.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure UnregisterPackageOnAbout;
|
||||
begin
|
||||
try
|
||||
(BorlandIDEServices As IOTAAboutBoxServices).RemovePluginInfo(PluginIndex);
|
||||
finally
|
||||
AboutBitmap.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
constructor TComponentAbout.Create(Comp: ShortString = ''; Ver: Single = 1.0;
|
||||
Copy: ShortString = ''; Auth: ShortString = ''; Home: ShortString = '');
|
||||
begin
|
||||
@@ -167,17 +78,4 @@ begin
|
||||
[mbClose],0)
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$IFDEF ADDSPLASHENTRY}
|
||||
RegisterPackageOnSplash;
|
||||
{$ENDIF}
|
||||
{$IFDEF ADDABOUTENTRY}
|
||||
RegisterPackageOnAbout;
|
||||
{$ENDIF}
|
||||
|
||||
finalization
|
||||
{$IFDEF ADDABOUTENTRY}
|
||||
UnregisterPackageOnAbout;
|
||||
{$ENDIF}
|
||||
|
||||
end.
|
||||
|
@@ -6,6 +6,12 @@ unit uCrypt;
|
||||
/// (c) 2014 Dennis G�hlert a.o. ///
|
||||
//////////////////////////////////////
|
||||
|
||||
{$IFNDEF MSWINDOWS}
|
||||
{$IFDEF WARN_INCOMPATIBLEOS}
|
||||
{$MESSAGE ERROR 'The "uCrypt" unit is only available under MS-Windows OS'}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
@@ -7,7 +7,9 @@ unit uFileCtrls;
|
||||
//////////////////////////////////////
|
||||
|
||||
{$IFNDEF MSWINDOWS}
|
||||
{$MESSAGE ERROR 'The "uFileCtrls" unit is only available under MS-Windows OS'}
|
||||
{$IFDEF WARN_INCOMPATIBLEOS}
|
||||
{$MESSAGE ERROR 'The "uFileCtrls" unit is only available under MS-Windows OS'}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
@@ -7,7 +7,9 @@ unit uFileTools;
|
||||
//////////////////////////////////////
|
||||
|
||||
{$IFNDEF MSWINDOWS}
|
||||
{$MESSAGE ERROR 'The "uFileTools" unit is only available under MS-Windows OS'}
|
||||
{$IFDEF WARN_INCOMPATIBLEOS}
|
||||
{$MESSAGE ERROR 'The "uFileTools" unit is only available under MS-Windows OS'}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
@@ -6,12 +6,18 @@ unit uFrmCtrls;
|
||||
/// (c) 2014 Dennis G�hlert a.o. ///
|
||||
//////////////////////////////////////
|
||||
|
||||
{$IFNDEF MSWINDOWS}
|
||||
{$IFDEF WARN_INCOMPATIBLEOS}
|
||||
{$MESSAGE ERROR 'The "uFrmCtrls" unit is only available under MS-Windows OS'}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
{ Standard-Units }
|
||||
SysUtils, Classes, Controls, Windows, Forms, StdCtrls, ComCtrls, ExtCtrls,
|
||||
Graphics,
|
||||
Graphics, Dialogs,
|
||||
{ Andere Package-Units }
|
||||
uBase, uSysTools, uSysCtrls, uWebCtrls;
|
||||
|
||||
@@ -435,11 +441,16 @@ type
|
||||
property References: TParamReferences read FReferences write SetReferences;
|
||||
end;
|
||||
|
||||
procedure SetTaskBarVisibe(const Value: Boolean);
|
||||
procedure ListParams(var OutList: TStrings);
|
||||
{ ShowMessage-Varianten }
|
||||
procedure ShowMessageVal(const Msg: Integer); overload;
|
||||
procedure ShowMessageVal(const Msg: Extended); overload;
|
||||
{ String-Aus-Parameter-Methoden }
|
||||
function StringFromParam(Ident,Value: String; Format: TParamFormat): String;
|
||||
function StringFromParamRef(ParamRef: TParamReference; UseDefVal: Boolean = True): String;
|
||||
function StringFromParams(Idents,Values: TStrings; Format: TParamFormat): String;
|
||||
{ Sonstige }
|
||||
procedure SetTaskBarVisibe(const Value: Boolean);
|
||||
procedure ListParams(var OutList: TStrings);
|
||||
|
||||
procedure Register;
|
||||
|
||||
@@ -472,30 +483,14 @@ begin
|
||||
RegisterComponents(ComponentsPage,[TSplashScreen,TProgressBarManager,TListBoxManager,TParamDefiner]);
|
||||
end;
|
||||
|
||||
procedure SetTaskBarVisibe(const Value: Boolean);
|
||||
procedure ShowMessageVal(const Msg: Integer);
|
||||
begin
|
||||
if Value = True then
|
||||
begin
|
||||
ShowWindow(Application.Handle,SW_HIDE);
|
||||
SetWindowLong(Application.Handle,GWL_EXSTYLE,GetWindowLong(Application.Handle,GWL_EXSTYLE) and not WS_EX_TOOLWINDOW or WS_EX_APPWINDOW);
|
||||
ShowWindow(Application.Handle,SW_SHOW);
|
||||
end else
|
||||
begin
|
||||
ShowWindow(Application.Handle,SW_SHOW);
|
||||
SetWindowLong(Application.Handle,GWL_EXSTYLE,GetWindowLong(Application.Handle,GWL_EXSTYLE) and not WS_EX_TOOLWINDOW or WS_EX_APPWINDOW);
|
||||
ShowWindow(Application.Handle,SW_HIDE);
|
||||
end;
|
||||
ShowMessage(IntToStr(Msg));
|
||||
end;
|
||||
|
||||
procedure ListParams(var OutList: TStrings);
|
||||
var
|
||||
Index: Integer;
|
||||
procedure ShowMessageVal(const Msg: Extended);
|
||||
begin
|
||||
OutList.Clear;
|
||||
for Index := 0 to ParamCount do
|
||||
begin
|
||||
OutList.Add(ParamStr(Index));
|
||||
end;
|
||||
ShowMessage(FloatToStr(Msg));
|
||||
end;
|
||||
|
||||
function StringFromParam(Ident,Value: String; Format: TParamFormat): String;
|
||||
@@ -558,6 +553,32 @@ begin
|
||||
Result := TmpStr;
|
||||
end;
|
||||
|
||||
procedure SetTaskBarVisibe(const Value: Boolean);
|
||||
begin
|
||||
if Value = True then
|
||||
begin
|
||||
ShowWindow(Application.Handle,SW_HIDE);
|
||||
SetWindowLong(Application.Handle,GWL_EXSTYLE,GetWindowLong(Application.Handle,GWL_EXSTYLE) and not WS_EX_TOOLWINDOW or WS_EX_APPWINDOW);
|
||||
ShowWindow(Application.Handle,SW_SHOW);
|
||||
end else
|
||||
begin
|
||||
ShowWindow(Application.Handle,SW_SHOW);
|
||||
SetWindowLong(Application.Handle,GWL_EXSTYLE,GetWindowLong(Application.Handle,GWL_EXSTYLE) and not WS_EX_TOOLWINDOW or WS_EX_APPWINDOW);
|
||||
ShowWindow(Application.Handle,SW_HIDE);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure ListParams(var OutList: TStrings);
|
||||
var
|
||||
Index: Integer;
|
||||
begin
|
||||
OutList.Clear;
|
||||
for Index := 0 to ParamCount do
|
||||
begin
|
||||
OutList.Add(ParamStr(Index));
|
||||
end;
|
||||
end;
|
||||
|
||||
{ ----------------------------------------------------------------------------
|
||||
TSplashObject
|
||||
---------------------------------------------------------------------------- }
|
||||
|
130
Source/uInit.pas
Normal file
130
Source/uInit.pas
Normal file
@@ -0,0 +1,130 @@
|
||||
unit uInit;
|
||||
|
||||
//////////////////////////////////////
|
||||
/// Lina Initialization Unit ///
|
||||
/// **************************** ///
|
||||
/// (c) 2014 Dennis G�hlert a.o. ///
|
||||
//////////////////////////////////////
|
||||
|
||||
interface
|
||||
|
||||
{ Dies ist die Initialisierungs-Unit f�r das Lina Components Package.
|
||||
Diese Unit darf NIEMALS direkt in eine Laufzeit-Library eingebunden
|
||||
werden! }
|
||||
|
||||
uses
|
||||
{ Standard-Units }
|
||||
ToolsAPI, Graphics;
|
||||
|
||||
procedure RegisterPackageOnSplash;
|
||||
procedure RegisterPackageOnAbout;
|
||||
procedure UnregisterPackageOnAbout;
|
||||
|
||||
const
|
||||
Package_Name = 'Lina Components';
|
||||
Package_Description = 'Components and code library for Delphi' + sLineBreak + '� 2014 Dennis G�hlert a.o.';
|
||||
Package_License = 'Mozilla Public License (MPL) 2.0';
|
||||
Package_SKU = '(Dev-Preview)';
|
||||
|
||||
var
|
||||
PluginIndex: Integer = -1;
|
||||
AboutBitmap: TBitmap;
|
||||
|
||||
implementation
|
||||
|
||||
procedure RegisterPackageOnSplash;
|
||||
var
|
||||
SplashBitmap: TBitmap;
|
||||
begin
|
||||
SplashBitmap := TBitmap.Create;
|
||||
try
|
||||
SplashBitmap.LoadFromResourceName(HInstance,'LINA');
|
||||
(ToolsAPI.SplashScreenServices as IOTASplashScreenServices).AddPluginBitmap(
|
||||
Package_Name,SplashBitmap.Handle,False,Package_License,Package_SKU);
|
||||
finally
|
||||
SplashBitmap.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure RegisterPackageOnAbout;
|
||||
begin
|
||||
AboutBitmap := TBitmap.Create;
|
||||
try
|
||||
AboutBitmap.LoadFromResourceName(HInstance,'LINA');
|
||||
PluginIndex := (ToolsAPI.BorlandIDEServices as IOTAAboutBoxServices120).AddPluginInfo(
|
||||
Package_Name,Package_Description,AboutBitmap.Handle,False,Package_License,Package_SKU);
|
||||
except
|
||||
AboutBitmap.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure UnregisterPackageOnAbout;
|
||||
begin
|
||||
try
|
||||
(BorlandIDEServices As IOTAAboutBoxServices).RemovePluginInfo(PluginIndex);
|
||||
finally
|
||||
AboutBitmap.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$IF CompilerVersion < 15.0}
|
||||
{ Fr�here Delphi-Versionen als Delphi 7 werden nicht (offiziell)
|
||||
unterst�tzt. }
|
||||
{$MESSAGE ERROR 'Lina Components requires Delphi 7 or higher'}
|
||||
{$IFEND}
|
||||
{$IF CompilerVersion < 18.5}
|
||||
{ Unter fr�heren Delphi-Versionen als 2007 gab es (offiziell) noch keine
|
||||
Unterst�tzung f�r Windows-Vista-spezifische funktionen wie die TaskDialog-
|
||||
Komponente oder einige Funktionen.
|
||||
Damit dies nicht zu Problemen f�hrt, geht der Compiler darauf mithilfe
|
||||
dieser Direktive ein. }
|
||||
{$DEFINE NO_VISTA}
|
||||
{$IFEND}
|
||||
{$IF CompilerVersion < 21.0}
|
||||
{ Unter fr�heren Delphi-Versionen als 2010 gab es ein Problem mit dem
|
||||
"crHandPoint" cursor, sodass dieser nicht korrekt unter Windows Vista oder
|
||||
h�her dargestellt wurde, sondern stattdessen im alten Windows-Look.
|
||||
Bei �lteren Delphi-Versionen als 2010 steht deswegen eine Pseudo-
|
||||
Komponente zur Behebung dieses Problems zur Verf�gung. }
|
||||
{$DEFINE NO_HANDPOINT}
|
||||
{$IFEND}
|
||||
{$IF CompilerVersion < 20.0}
|
||||
{ Unter fr�heren Delphi-Versionen als 2009 war die Nutzung generischer
|
||||
Datentypen (Generics) nicht m�glich. Da es ohne diese nahezu unm�glich
|
||||
scheint, typisierte Objekte, wie zum Beispiel typisierte TObjectList's
|
||||
zu deklarieren, fallen diese Deklarationen unter fr�heren Delphi-Versionen
|
||||
weg. Dies kann eventuell zu kompatibilit�tsproblemen zwischen
|
||||
unterschiedlichen Nutzern dieser Komponenten f�hren, l�sst sich aber nicht
|
||||
vermeiden. }
|
||||
{$DEFINE NO_GENERIC}
|
||||
{$IFEND}
|
||||
{$IF CompilerVersion < 20.0}
|
||||
{ Unter fr�heren Delphi-Versionen als 2009 entsprach der String-Typenalias
|
||||
dem AnsiString-Typen. Da es gegebenfalls bei manchen externen (zB. OS-
|
||||
Spezifischen) Klassen zu Kompatibilit�tsproblemen kommmen k�nnte, wird
|
||||
hier eine �berpr�fung der Unicode-Unterst�tzung durchgef�hrt.
|
||||
Zu beachten ist jedoch, dass Delphi 2009 und h�her AnsiStrings implizit
|
||||
in UnicodeStrings umwandelt und umgekehrt (sofern m�glich). }
|
||||
{$DEFINE NO_UNICODE}
|
||||
{$IFEND}
|
||||
{ Globale Einstellungen }
|
||||
{$DEFINE ADD_SPLASHENTRY}
|
||||
{$DEFINE ADD_ABOUTENTRY}
|
||||
{$DEFINE WARN_INCOMPATIBLEOS}
|
||||
|
||||
{ Package-Registrierung }
|
||||
{$IFDEF ADD_SPLASHENTRY}
|
||||
RegisterPackageOnSplash;
|
||||
{$ENDIF}
|
||||
{$IFDEF ADD_ABOUTENTRY}
|
||||
RegisterPackageOnAbout;
|
||||
{$ENDIF}
|
||||
|
||||
finalization
|
||||
{ Package-Deregistrierung }
|
||||
{$IFDEF ADD_ABOUTENTRY}
|
||||
UnregisterPackageOnAbout;
|
||||
{$ENDIF}
|
||||
|
||||
end.
|
@@ -6,6 +6,12 @@ unit uLocalMgr;
|
||||
/// (c) 2014 Dennis G�hlert a.o. ///
|
||||
//////////////////////////////////////
|
||||
|
||||
{$IFNDEF MSWINDOWS}
|
||||
{$IFDEF WARN_INCOMPATIBLEOS}
|
||||
{$MESSAGE ERROR 'The "uLocalMgr" unit is only available under MS-Windows OS'}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
@@ -6,6 +6,12 @@ unit uScriptMgr;
|
||||
/// (c) 2014 Dennis G�hlert a.o. ///
|
||||
//////////////////////////////////////
|
||||
|
||||
{$IFNDEF MSWINDOWS}
|
||||
{$IFDEF WARN_INCOMPATIBLEOS}
|
||||
{$MESSAGE ERROR 'The "uScriptMgr" unit is only available under MS-Windows OS'}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
{ Wegen Kompatibilit�tsgr�nden mussten einige AnsiString-Werte eingebaut
|
||||
|
@@ -7,7 +7,9 @@ unit uSysCtrls;
|
||||
//////////////////////////////////////
|
||||
|
||||
{$IFNDEF MSWINDOWS}
|
||||
{$MESSAGE ERROR 'The "uSysCtrls" unit is only available under MS-Windows OS'}
|
||||
{$IFDEF WARN_INCOMPATIBLEOS}
|
||||
{$MESSAGE ERROR 'The "uSysCtrls" unit is only available under MS-Windows OS'}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
@@ -6,16 +6,21 @@ unit uSysTools;
|
||||
/// (c) 2014 Dennis G�hlert a.o. ///
|
||||
//////////////////////////////////////
|
||||
|
||||
{$IFNDEF MSWINDOWS}
|
||||
{$IFDEF WARN_INCOMPATIBLEOS}
|
||||
{$MESSAGE ERROR 'The "uSysTools" unit is only available under MS-Windows OS'}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
{ Standard-Units }
|
||||
SysUtils, Classes, Math, Windows, Graphics, Printers,
|
||||
SysUtils, Classes, Math, Windows, Graphics, Printers
|
||||
{$IFNDEF NO_GENERIC}
|
||||
Generics.Collections,
|
||||
,Generics.Collections
|
||||
{$ENDIF}
|
||||
{ Andere Package-Units }
|
||||
uBase;
|
||||
;
|
||||
|
||||
type
|
||||
{ Fehlermeldungen }
|
||||
@@ -36,12 +41,49 @@ type
|
||||
TFloatList = TList<Extended>;
|
||||
TPointList = TList<TPoint>;
|
||||
{$ENDIF}
|
||||
{ Typisierte Arrays }
|
||||
TVariantArray = array of Variant;
|
||||
|
||||
TStringArray = array of String;
|
||||
TShortStringArray = array of ShortString;
|
||||
|
||||
TByteArray = array of Byte;
|
||||
TWordArray = array of Word;
|
||||
TCardinalArray = array of Cardinal;
|
||||
|
||||
TIntegerArray = array of Integer;
|
||||
TShortIntArray = array of ShortInt;
|
||||
TSmallIntArray = array of SmallInt;
|
||||
TLongIntArray = TIntegerArray;
|
||||
TInt32Array = TIntegerArray;
|
||||
TInt64Array = array of Int64;
|
||||
|
||||
TBooleanArray = array of Boolean;
|
||||
|
||||
TFloatArray = array of Extended;
|
||||
TSingleArray = array of Single;
|
||||
TDoubleArray = array of Double;
|
||||
TRealArray = array of Real;
|
||||
TExtendedArray = TFloatArray;
|
||||
|
||||
TPointArray = array of TPoint;
|
||||
|
||||
TCycle = record
|
||||
private
|
||||
{ Private-Deklarationen }
|
||||
FRadius: Extended;
|
||||
{ Methoden }
|
||||
function GetDiameter: Extended;
|
||||
procedure SetDiameter(Value: Extended);
|
||||
function GetCircumference: Extended;
|
||||
procedure SetCircumference(Value: Extended);
|
||||
public
|
||||
{ Public-Deklarationen }
|
||||
property Radius: Extended read FRadius write FRadius;
|
||||
property Diameter: Extended read GetDiameter write SetDiameter;
|
||||
property Circumference: Extended read GetCircumference write SetCircumference;
|
||||
end;
|
||||
|
||||
TFilteredStringList = class(TStringList)
|
||||
private
|
||||
{ Private-Deklarationen }
|
||||
@@ -82,8 +124,18 @@ type
|
||||
{ Array-Position }
|
||||
function ArrayPos(const AValue: Variant; const AArray: array of Variant): Integer; overload;
|
||||
function ArrayPos(const AValue: Char; const AArray: array of Char): Integer; overload;
|
||||
function ArrayPos(const AValue: ShortString; const AArray: array of ShortString): Integer; overload;
|
||||
function ArrayPos(const AValue: String; const AArray: array of String): Integer; overload;
|
||||
function ArrayPos(const AValue: Integer; const AArray: array of Integer): Integer; overload;
|
||||
function ArrayPos(const AValue: ShortInt; const AArray: array of ShortInt): Integer; overload;
|
||||
function ArrayPos(const AValue: SmallInt; const AArray: array of SmallInt): Integer; overload;
|
||||
function ArrayPos(const AValue: LongInt; const AArray: array of LongInt): Integer; overload;
|
||||
function ArrayPos(const AValue: Int64; const AArray: array of Int64): Integer; overload;
|
||||
function ArrayPos(const AValue: Byte; const AArray: array of Byte): Integer; overload;
|
||||
function ArrayPos(const AValue: Word; const AArray: array of Word): Integer; overload;
|
||||
function ArrayPos(const AValue: Cardinal; const AArray: array of Cardinal): Integer; overload;
|
||||
function ArrayPos(const AValue: Single; const AArray: array of Single): Integer; overload;
|
||||
function ArrayPos(const AValue: Double; const AArray: array of Double): Integer; overload;
|
||||
function ArrayPos(const AValue: Real; const AArray: array of Real): Integer; overload;
|
||||
function ArrayPos(const AValue: Extended; const AArray: array of Extended): Integer; overload;
|
||||
{ TComponent Laden/Speichern }
|
||||
procedure ComponentSaveToFile(const FileName: String; Component: TComponent);
|
||||
@@ -93,16 +145,29 @@ type
|
||||
{ Char-Case-Umwandelungen }
|
||||
function CharLowerCase(Character: Char): Char;
|
||||
function CharUpperCase(Character: Char): Char;
|
||||
{ Null-/Plus-Minus-Unendlich- Ann�herung }
|
||||
procedure ToZero(var X: Integer);
|
||||
procedure ToInf(var X: Integer);
|
||||
{ Gradzahlen-Normalisierer }
|
||||
procedure NormalizeDeg(var X: Integer); overload;
|
||||
procedure NormalizeDeg(var X: Single); overload;
|
||||
procedure NormalizeDeg(var X: Double); overload;
|
||||
procedure NormalizeDeg(var X: Real); overload;
|
||||
procedure NormalizeDeg(var X: Extended); overload;
|
||||
{ PQ-Formel }
|
||||
function PQFormula(P,Q: Single): TSingleArray; overload;
|
||||
function PQFormula(P,Q: Double): TDoubleArray; overload;
|
||||
function PQFormula(P,Q: Real): TRealArray; overload;
|
||||
function PQFormula(P,Q: Extended): TExtendedArray; overload;
|
||||
{ Sonstige }
|
||||
function SecToTime(const Sec: Cardinal): TTime;
|
||||
function SystemLanguage: String;
|
||||
function ExtractUserName(const Owner: String): String;
|
||||
function ExtractUserDomain(const Owner: String): String;
|
||||
function RoundPos(Number: Extended; Pos: Byte): Extended;
|
||||
function RoundPos(Number: Single; Pos: Byte): Single;
|
||||
function FontSizeToHeight(Size: Integer; PpI: Integer): Integer;
|
||||
function FontHeightToSize(Height: Integer; PpI: Integer): Integer;
|
||||
function ComponentByTag(Owner: TComponent; const Tag: Integer): TComponent;
|
||||
function PQFormula(P,Q: Extended): TFloatArray;
|
||||
procedure PrintText(Strings: TStrings; Font: TFont);
|
||||
procedure EnableDebugPrivilege;
|
||||
|
||||
@@ -117,13 +182,7 @@ uses
|
||||
|
||||
function BoolToInt(B: Boolean): Integer;
|
||||
begin
|
||||
if B then
|
||||
begin
|
||||
Result := not 0;
|
||||
end else
|
||||
begin
|
||||
Result := 0;
|
||||
end;
|
||||
Result := -Integer(B)
|
||||
end;
|
||||
|
||||
function IntToBool(Value: Integer): Boolean;
|
||||
@@ -154,7 +213,7 @@ end;
|
||||
|
||||
function FloatIsInt(Value: Extended): Boolean;
|
||||
begin
|
||||
Result := (Ceil(Value) = Floor(Value));
|
||||
Result := (Frac(Value) = 0);
|
||||
end;
|
||||
|
||||
procedure ComponentSaveToFile(const FileName: String; Component: TComponent);
|
||||
@@ -215,23 +274,239 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{$IFDEF PUREPASCAL}
|
||||
procedure ToZero(var X: LongInt);
|
||||
begin
|
||||
if X < 0 then
|
||||
begin
|
||||
Inc(X);
|
||||
end;
|
||||
if X > 0 then
|
||||
begin
|
||||
Dec(X);
|
||||
end;
|
||||
end;
|
||||
{$ELSE}
|
||||
procedure ToZero(var X: Integer); assembler;
|
||||
asm
|
||||
CMP [EAX],0
|
||||
JE @Zer
|
||||
JL @Neg
|
||||
SUB [EAX],1
|
||||
JMP @Zer
|
||||
@Neg:
|
||||
ADD [EAX],1
|
||||
@Zer:
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF PUREPASCAL}
|
||||
procedure ToInf(var X: LongInt);
|
||||
begin
|
||||
if X < 0 then
|
||||
begin
|
||||
Dec(X);
|
||||
end;
|
||||
if X > 0 then
|
||||
begin
|
||||
Inc(X);
|
||||
end;
|
||||
end;
|
||||
{$ELSE}
|
||||
procedure ToInf(var X: Integer); assembler;
|
||||
asm
|
||||
CMP [EAX],0
|
||||
JE @Zer
|
||||
JL @Neg
|
||||
ADD [EAX],1
|
||||
JMP @Zer
|
||||
@Neg:
|
||||
SUB [EAX],1
|
||||
@Zer:
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF PUREPASCAL}
|
||||
procedure NormalizeDeg(var X: LongInt);
|
||||
begin
|
||||
while X >= 360 do
|
||||
begin
|
||||
X := X - 360;
|
||||
end;
|
||||
while X < 0 do
|
||||
begin
|
||||
X := X + 360;
|
||||
end;
|
||||
end;
|
||||
{$ELSE}
|
||||
procedure NormalizeDeg(var X: Integer); assembler;
|
||||
asm
|
||||
@Cmp_Low:
|
||||
CMP [EAX],0
|
||||
JL @Low
|
||||
@Cmp_High:
|
||||
CMP [EAX],360
|
||||
JGE @High
|
||||
JMP @Fin
|
||||
@Low:
|
||||
ADD [EAX],360
|
||||
JMP @Cmp_High
|
||||
@High:
|
||||
SUB [EAX],360
|
||||
JMP @Cmp_High
|
||||
@Fin:
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
procedure NormalizeDeg(var X: Single); overload;
|
||||
begin
|
||||
while X >= 360 do
|
||||
begin
|
||||
X := X - 360;
|
||||
end;
|
||||
while X < 0 do
|
||||
begin
|
||||
X := X + 360;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure NormalizeDeg(var X: Double); overload;
|
||||
begin
|
||||
while X >= 360 do
|
||||
begin
|
||||
X := X - 360;
|
||||
end;
|
||||
while X < 0 do
|
||||
begin
|
||||
X := X + 360;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure NormalizeDeg(var X: Real); overload;
|
||||
begin
|
||||
while X >= 360 do
|
||||
begin
|
||||
X := X - 360;
|
||||
end;
|
||||
while X < 0 do
|
||||
begin
|
||||
X := X + 360;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure NormalizeDeg(var X: Extended); overload;
|
||||
begin
|
||||
while X >= 360 do
|
||||
begin
|
||||
X := X - 360;
|
||||
end;
|
||||
while X < 0 do
|
||||
begin
|
||||
X := X + 360;
|
||||
end;
|
||||
end;
|
||||
|
||||
function PQFormula(P,Q: Single): TSingleArray;
|
||||
var
|
||||
Root: Single;
|
||||
begin
|
||||
Root := Sqr(P / 2) - Q;
|
||||
if Root < 0 then
|
||||
begin
|
||||
SetLength(Result,0);
|
||||
end else
|
||||
begin
|
||||
if Root = 0 then
|
||||
begin
|
||||
SetLength(Result,1);
|
||||
end else
|
||||
begin
|
||||
SetLength(Result,2);
|
||||
Result[1] := -(P / 2) - Sqrt(Root);
|
||||
end;
|
||||
Result[0] := -(P / 2) + Sqrt(Root);
|
||||
end;
|
||||
end;
|
||||
|
||||
function PQFormula(P,Q: Double): TDoubleArray;
|
||||
var
|
||||
Root: Double;
|
||||
begin
|
||||
Root := Sqr(P / 2) - Q;
|
||||
if Root < 0 then
|
||||
begin
|
||||
SetLength(Result,0);
|
||||
end else
|
||||
begin
|
||||
if Root = 0 then
|
||||
begin
|
||||
SetLength(Result,1);
|
||||
end else
|
||||
begin
|
||||
SetLength(Result,2);
|
||||
Result[1] := -(P / 2) - Sqrt(Root);
|
||||
end;
|
||||
Result[0] := -(P / 2) + Sqrt(Root);
|
||||
end;
|
||||
end;
|
||||
|
||||
function PQFormula(P,Q: Real): TRealArray;
|
||||
var
|
||||
Root: Real;
|
||||
begin
|
||||
Root := Sqr(P / 2) - Q;
|
||||
if Root < 0 then
|
||||
begin
|
||||
SetLength(Result,0);
|
||||
end else
|
||||
begin
|
||||
if Root = 0 then
|
||||
begin
|
||||
SetLength(Result,1);
|
||||
end else
|
||||
begin
|
||||
SetLength(Result,2);
|
||||
Result[1] := -(P / 2) - Sqrt(Root);
|
||||
end;
|
||||
Result[0] := -(P / 2) + Sqrt(Root);
|
||||
end;
|
||||
end;
|
||||
|
||||
function PQFormula(P,Q: Extended): TExtendedArray;
|
||||
var
|
||||
Root: Extended;
|
||||
begin
|
||||
Root := Sqr(P / 2) - Q;
|
||||
if Root < 0 then
|
||||
begin
|
||||
SetLength(Result,0);
|
||||
end else
|
||||
begin
|
||||
if Root = 0 then
|
||||
begin
|
||||
SetLength(Result,1);
|
||||
end else
|
||||
begin
|
||||
SetLength(Result,2);
|
||||
Result[1] := -(P / 2) - Sqrt(Root);
|
||||
end;
|
||||
Result[0] := -(P / 2) + Sqrt(Root);
|
||||
end;
|
||||
end;
|
||||
|
||||
function SecToTime(const Sec: Cardinal): TTime;
|
||||
var
|
||||
TH, TM, TS: String;
|
||||
SH, SM, SS: Integer;
|
||||
Hours, Minutes, Seconds: Word;
|
||||
begin
|
||||
if Sec <= 0 then
|
||||
begin
|
||||
Result := StrToTime('00:00:00');
|
||||
Exit;
|
||||
end;
|
||||
SH := Sec div 3600;
|
||||
SM := Sec div 60 - SH * 60;
|
||||
SS := Sec - (SH * 3600 + SM * 60) ;
|
||||
TH := IntToStr(SH);
|
||||
TM := IntToStr(SM);
|
||||
TS := IntToStr(SS);
|
||||
Result := StrToTime(TH + ':' + TM + ':' + TS);
|
||||
Hours := Sec div 3600;
|
||||
Minutes := Sec div 60 - Hours * 60;
|
||||
Seconds := Sec - (Hours * 3600 + Minutes * 60) ;
|
||||
Result := StrToTime(IntToStr(Hours) + ':' + IntToStr(Minutes) + ':' + IntToStr(Seconds));
|
||||
end;
|
||||
|
||||
function SystemLanguage: String;
|
||||
@@ -272,6 +547,21 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function ArrayPos(const AValue: ShortString; const AArray: array of ShortString): Integer; overload;
|
||||
var
|
||||
Index: Integer;
|
||||
begin
|
||||
Result := Low(AArray) - 1;
|
||||
for Index := Low(AArray) to High(AArray) do
|
||||
begin
|
||||
if AArray[Index] = AValue then
|
||||
begin
|
||||
Result := Index;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function ArrayPos(const AValue: String; const AArray: array of String): Integer; overload;
|
||||
var
|
||||
Index: Integer;
|
||||
@@ -287,7 +577,142 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function ArrayPos(const AValue: Integer; const AArray: array of Integer): Integer; overload;
|
||||
function ArrayPos(const AValue: ShortInt; const AArray: array of ShortInt): Integer; overload;
|
||||
var
|
||||
Index: Integer;
|
||||
begin
|
||||
Result := Low(AArray) - 1;
|
||||
for Index := Low(AArray) to High(AArray) do
|
||||
begin
|
||||
if AArray[Index] = AValue then
|
||||
begin
|
||||
Result := Index;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function ArrayPos(const AValue: SmallInt; const AArray: array of SmallInt): Integer; overload;
|
||||
var
|
||||
Index: Integer;
|
||||
begin
|
||||
Result := Low(AArray) - 1;
|
||||
for Index := Low(AArray) to High(AArray) do
|
||||
begin
|
||||
if AArray[Index] = AValue then
|
||||
begin
|
||||
Result := Index;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function ArrayPos(const AValue: LongInt; const AArray: array of LongInt): Integer; overload;
|
||||
var
|
||||
Index: Integer;
|
||||
begin
|
||||
Result := Low(AArray) - 1;
|
||||
for Index := Low(AArray) to High(AArray) do
|
||||
begin
|
||||
if AArray[Index] = AValue then
|
||||
begin
|
||||
Result := Index;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function ArrayPos(const AValue: Int64; const AArray: array of Int64): Integer; overload;
|
||||
var
|
||||
Index: Integer;
|
||||
begin
|
||||
Result := Low(AArray) - 1;
|
||||
for Index := Low(AArray) to High(AArray) do
|
||||
begin
|
||||
if AArray[Index] = AValue then
|
||||
begin
|
||||
Result := Index;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function ArrayPos(const AValue: Byte; const AArray: array of Byte): Integer; overload;
|
||||
var
|
||||
Index: Integer;
|
||||
begin
|
||||
Result := Low(AArray) - 1;
|
||||
for Index := Low(AArray) to High(AArray) do
|
||||
begin
|
||||
if AArray[Index] = AValue then
|
||||
begin
|
||||
Result := Index;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function ArrayPos(const AValue: Word; const AArray: array of Word): Integer; overload;
|
||||
var
|
||||
Index: Integer;
|
||||
begin
|
||||
Result := Low(AArray) - 1;
|
||||
for Index := Low(AArray) to High(AArray) do
|
||||
begin
|
||||
if AArray[Index] = AValue then
|
||||
begin
|
||||
Result := Index;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function ArrayPos(const AValue: Cardinal; const AArray: array of Cardinal): Integer; overload;
|
||||
var
|
||||
Index: Integer;
|
||||
begin
|
||||
Result := Low(AArray) - 1;
|
||||
for Index := Low(AArray) to High(AArray) do
|
||||
begin
|
||||
if AArray[Index] = AValue then
|
||||
begin
|
||||
Result := Index;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function ArrayPos(const AValue: Single; const AArray: array of Single): Integer; overload;
|
||||
var
|
||||
Index: Integer;
|
||||
begin
|
||||
Result := Low(AArray) - 1;
|
||||
for Index := Low(AArray) to High(AArray) do
|
||||
begin
|
||||
if AArray[Index] = AValue then
|
||||
begin
|
||||
Result := Index;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function ArrayPos(const AValue: Double; const AArray: array of Double): Integer; overload;
|
||||
var
|
||||
Index: Integer;
|
||||
begin
|
||||
Result := Low(AArray) - 1;
|
||||
for Index := Low(AArray) to High(AArray) do
|
||||
begin
|
||||
if AArray[Index] = AValue then
|
||||
begin
|
||||
Result := Index;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function ArrayPos(const AValue: Real; const AArray: array of Real): Integer; overload;
|
||||
var
|
||||
Index: Integer;
|
||||
begin
|
||||
@@ -349,13 +774,12 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function RoundPos(Number: Extended; Pos: Byte): Extended;
|
||||
function RoundPos(Number: Single; Pos: Byte): Single;
|
||||
var
|
||||
Factor: Extended;
|
||||
Factor: Single;
|
||||
begin
|
||||
Factor := IntPower(10,Pos);
|
||||
Number := Round(Number * Factor);
|
||||
Result := Number / Factor;
|
||||
Result := Round(Number * Factor) / Factor;
|
||||
end;
|
||||
|
||||
function FontSizeToHeight(Size: Integer; PpI: Integer): Integer;
|
||||
@@ -377,30 +801,10 @@ begin
|
||||
if Owner.Components[Index].Tag = Tag then
|
||||
begin
|
||||
Result := Owner.Components[Index];
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function PQFormula(P,Q: Extended): TFloatArray;
|
||||
var
|
||||
Root: Extended;
|
||||
begin
|
||||
Root := Sqr(P / 2) - Q;
|
||||
if Root < 0 then
|
||||
begin
|
||||
SetLength(Result,0);
|
||||
end else
|
||||
begin
|
||||
if Root = 0 then
|
||||
begin
|
||||
SetLength(Result,1);
|
||||
end else
|
||||
begin
|
||||
SetLength(Result,2);
|
||||
Result[1] := -(P / 2) - Sqrt(Root);
|
||||
end;
|
||||
Result[0] := -(P / 2) + Sqrt(Root);
|
||||
end;
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
procedure PrintText(Strings: TStrings; Font: TFont);
|
||||
@@ -524,6 +928,30 @@ begin
|
||||
//... MUSS NOCH GESCHRIEBEN WERDEN!!!
|
||||
end;
|
||||
|
||||
{ ----------------------------------------------------------------------------
|
||||
TCycle
|
||||
---------------------------------------------------------------------------- }
|
||||
|
||||
function TCycle.GetDiameter: Extended;
|
||||
begin
|
||||
Result := Radius * 2;
|
||||
end;
|
||||
|
||||
procedure TCycle.SetDiameter(Value: Extended);
|
||||
begin
|
||||
Radius := Value / 2;
|
||||
end;
|
||||
|
||||
function TCycle.GetCircumference: Extended;
|
||||
begin
|
||||
Result := 2 * Pi * Radius;
|
||||
end;
|
||||
|
||||
procedure TCycle.SetCircumference(Value: Extended);
|
||||
begin
|
||||
FRadius := Value / 2 / Pi;
|
||||
end;
|
||||
|
||||
{ ----------------------------------------------------------------------------
|
||||
TFilteredStringList
|
||||
---------------------------------------------------------------------------- }
|
||||
|
@@ -6,6 +6,12 @@ unit uVirtObj;
|
||||
/// (c) 2014 Dennis G�hlert a.o. ///
|
||||
//////////////////////////////////////
|
||||
|
||||
{$IFNDEF MSWINDOWS}
|
||||
{$IFDEF WARN_INCOMPATIBLEOS}
|
||||
{$MESSAGE ERROR 'The "uVirtObj" unit is only available under MS-Windows OS'}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
@@ -6,6 +6,12 @@ unit uWebCtrls;
|
||||
/// (c) 2014 Dennis G�hlert a.o. ///
|
||||
//////////////////////////////////////
|
||||
|
||||
{$IFNDEF MSWINDOWS}
|
||||
{$IFDEF WARN_INCOMPATIBLEOS}
|
||||
{$MESSAGE ERROR 'The "uWebCtrls" unit is only available under MS-Windows OS'}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
Reference in New Issue
Block a user