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.11b
Signed-off-by: Dennis07 <den.goehlert@t-online.de>
This commit is contained in:
BIN
Example/TSplashScreen/pExample.exe
Normal file
BIN
Example/TSplashScreen/pExample.exe
Normal file
Binary file not shown.
Binary file not shown.
@@ -87,20 +87,25 @@ end;
|
||||
procedure TfmMain.edPathChange(Sender: TObject);
|
||||
var
|
||||
CurrentFile: TWinFile;
|
||||
List: TStrings;
|
||||
begin
|
||||
if FileExists(edPath.Text) then
|
||||
begin
|
||||
CurrentFile := TWinFile.Create(edPath.Text);
|
||||
List := TStringList.Create;
|
||||
try
|
||||
leFileName.Text := CurrentFile.GetFileName(False);
|
||||
leFileExt.Text := CurrentFile.GetExtension(False);
|
||||
leFolderName.Text := CurrentFile.GetFolderName;
|
||||
lbOtherFolders.Items.Clear;
|
||||
ListFolders(CurrentFile.GetPath,lbOtherFolders.Items);
|
||||
lbOtherFiles.Items.Clear;
|
||||
ListFiles(CurrentFile.GetPath,lbOtherFiles.Items,['*.pas','*.dpr'],[fnExtension]);
|
||||
List.Clear;
|
||||
ListFolders(CurrentFile.GetPath,List);
|
||||
lbOtherFolders.Items.Assign(List);
|
||||
List.Clear;
|
||||
ListFiles(CurrentFile.GetPath,List,['*.pas','*.dpr'],[fnExtension]);
|
||||
lbOtherFiles.Items.Assign(List);
|
||||
finally
|
||||
CurrentFile.Free;
|
||||
List.Free;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
BIN
Resource/Bitmap/TContextMenu.bmp
Normal file
BIN
Resource/Bitmap/TContextMenu.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -21,10 +21,9 @@ type
|
||||
|
||||
type
|
||||
{ Hauptklassen }
|
||||
TLocalization = class
|
||||
TLocalization = class(TCollectionItem)
|
||||
private
|
||||
{ Private-Deklarationen }
|
||||
FFileName: TFileName;
|
||||
FLanguageName: ShortString;
|
||||
FLines: TStrings;
|
||||
protected
|
||||
@@ -33,26 +32,42 @@ type
|
||||
{ Public-Deklarationen }
|
||||
constructor Create; overload;
|
||||
constructor Create(AFileName: TFileName); overload;
|
||||
destructor Destroy;
|
||||
destructor Destroy; overload;
|
||||
function Check: Boolean;
|
||||
procedure Apply;
|
||||
published
|
||||
{ Published-Deklarationen }
|
||||
property FileName: TFileName read FFileName write FFileName;
|
||||
property LanguageName: ShortString read FLanguageName write FLanguageName;
|
||||
property Lines: TStrings read FLines;
|
||||
property Lines: TStrings read FLines write FLines;
|
||||
end;
|
||||
|
||||
TLocalizations = array of TLocalization;
|
||||
TLocalizationManager = class;
|
||||
|
||||
TLocalizations = class(TCollection)
|
||||
private
|
||||
{ Private-Deklarationen }
|
||||
FManager: TLocalizationManager;
|
||||
{ Methoden }
|
||||
function GetManager: TLocalizationManager;
|
||||
procedure SetManager(Value: TLocalizationManager);
|
||||
public
|
||||
{ Public-Deklarationen }
|
||||
constructor Create(ItemClass: TCollectionItemClass; AManager: TLocalizationManager);
|
||||
destructor Destroy; override;
|
||||
property Manager: TLocalizationManager read FManager write FManager;
|
||||
end;
|
||||
|
||||
TLocalizationManager = class(TComponent)
|
||||
private
|
||||
{ Private-Deklarationen }
|
||||
FAbout: TComponentAbout;
|
||||
FLanguages: TLocalizations;
|
||||
FLocalizations: TLocalizations;
|
||||
FCurrent: TLocalization;
|
||||
FDefault: TLocalization;
|
||||
FDetect: TComponentDetectMode;
|
||||
FStructure: TIdentifyStructure;
|
||||
{ Methoden }
|
||||
procedure SetCurrent(Value: TLocalization);
|
||||
protected
|
||||
{ Protected-Deklarationen }
|
||||
public
|
||||
@@ -62,8 +77,8 @@ type
|
||||
published
|
||||
{ Published-Deklarationen }
|
||||
property About: TComponentAbout read FAbout;
|
||||
property Languages: TLocalizations read FLanguages write FLanguages;
|
||||
property Current: TLocalization read FCurrent write FCurrent;
|
||||
property Localizations: TLocalizations read FLocalizations write FLocalizations;
|
||||
property Current: TLocalization read FCurrent write SetCurrent;
|
||||
property Default: TLocalization read FDefault write FDefault;
|
||||
property Detect: TComponentDetectMode read FDetect write FDetect default cdName;
|
||||
property Structure: TIdentifyStructure read FStructure write FStructure default isSection;
|
||||
@@ -91,30 +106,62 @@ end;
|
||||
|
||||
constructor TLocalization.Create;
|
||||
begin
|
||||
//...
|
||||
Lines := TStringList.Create;
|
||||
end;
|
||||
|
||||
constructor TLocalization.Create(AFileName: TFileName);
|
||||
begin
|
||||
//...
|
||||
Create;
|
||||
Lines.LoadFromFile(AFileName);
|
||||
end;
|
||||
|
||||
destructor TLocalization.Destroy;
|
||||
begin
|
||||
//...
|
||||
Lines.Free;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TLocalization.Check: Boolean;
|
||||
var
|
||||
Index: Integer;
|
||||
begin
|
||||
|
||||
for Index := 0 to Lines.Count do
|
||||
begin
|
||||
|
||||
//...
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TLocalization.Apply;
|
||||
begin
|
||||
//...
|
||||
end;
|
||||
|
||||
{ ----------------------------------------------------------------------------
|
||||
TLocalizations
|
||||
---------------------------------------------------------------------------- }
|
||||
|
||||
function TLocalizations.GetManager: TLocalizationManager;
|
||||
begin
|
||||
Result := FManager;
|
||||
end;
|
||||
|
||||
procedure TLocalizations.SetManager(Value: TLocalizationManager);
|
||||
begin
|
||||
FManager := Value;
|
||||
end;
|
||||
|
||||
constructor TLocalizations.Create(ItemClass: TCollectionItemClass; AManager: TLocalizationManager);
|
||||
begin
|
||||
inherited Create(ItemClass);
|
||||
FManager := AManager;
|
||||
end;
|
||||
|
||||
destructor TLocalizations.Destroy;
|
||||
begin
|
||||
FManager := nil;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
{ ----------------------------------------------------------------------------
|
||||
TLocalizationManager
|
||||
---------------------------------------------------------------------------- }
|
||||
@@ -123,12 +170,23 @@ constructor TLocalizationManager.Create(AOwnder: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FAbout := TComponentAbout.Create(LocalizationManagerComponent_Name,LocalizationManagerComponent_Version,LocalizationManagerComponent_Copyright,LocalizationManagerComponent_Author);
|
||||
FLocalizations := TLocalizations.Create(TLocalization,Self);
|
||||
//Aktuelle Loc = Standard-Loc
|
||||
Current := Default;
|
||||
end;
|
||||
|
||||
destructor TLocalizationManager.Destroy;
|
||||
begin
|
||||
//...
|
||||
FCurrent := nil;
|
||||
FAbout.Free;
|
||||
FLocalizations.Free;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TLocalizationManager.SetCurrent(Value: TLocalization);
|
||||
begin
|
||||
FCurrent := Value;
|
||||
Value.Apply;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@@ -87,10 +87,10 @@ type
|
||||
function GetParentID(ProcName: String): DWORD;
|
||||
function GetPriority(ProcName: String): Integer;
|
||||
function GetMemory(ProcID: DWORD): DWORD;
|
||||
property Names: TStrings read GetNames;
|
||||
published
|
||||
{ Published-Deklarationen }
|
||||
property About: TComponentAbout read FAbout;
|
||||
property Names: TStrings read GetNames;
|
||||
property TimeOut: DWORD read FTimeOut write FTimeOut;
|
||||
property RefreshMode: TProcessRefreshMode read FRefreshMode write SetRefreshMode default prNone;
|
||||
property Interval: Cardinal read GetInterval write SetInterval default 1000;
|
||||
|
@@ -85,10 +85,10 @@ type
|
||||
function ArrayPos(const AValue: Integer; const AArray: array of Integer): Integer; overload;
|
||||
function ArrayPos(const AValue: Extended; const AArray: array of Extended): Integer; overload;
|
||||
{ TComponent Laden/Speichern }
|
||||
procedure SaveComponentToFile(const FileName: String; Component: TComponent);
|
||||
procedure LoadComponentFromFile(const FileName: String; Component: TComponent);
|
||||
procedure SaveComponentToStream(var Stream: TStream; Component: TComponent);
|
||||
procedure LoadComponentFromStream(Stream: TStream; Component: TComponent);
|
||||
procedure ComponentSaveToFile(const FileName: String; Component: TComponent);
|
||||
procedure ComponentLoadFromFile(const FileName: String; Component: TComponent);
|
||||
procedure ComponentSaveToStream(var Stream: TStream; Component: TComponent);
|
||||
procedure ComponentLoadFromStream(Stream: TStream; Component: TComponent);
|
||||
{ Char-Case-Umwandelungen }
|
||||
function CharLowerCase(Character: Char): Char;
|
||||
function CharUpperCase(Character: Char): Char;
|
||||
@@ -154,7 +154,7 @@ begin
|
||||
Result := (Ceil(Value) = Floor(Value));
|
||||
end;
|
||||
|
||||
procedure SaveComponentToFile(const FileName: String; Component: TComponent);
|
||||
procedure ComponentSaveToFile(const FileName: String; Component: TComponent);
|
||||
var
|
||||
FS: TFileStream;
|
||||
begin
|
||||
@@ -166,7 +166,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure LoadComponentFromFile(const FileName: String; Component: TComponent);
|
||||
procedure ComponentLoadFromFile(const FileName: String; Component: TComponent);
|
||||
var
|
||||
FS: TFileStream;
|
||||
begin
|
||||
@@ -178,12 +178,12 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure SaveComponentToStream(var Stream: TStream; Component: TComponent);
|
||||
procedure ComponentSaveToStream(var Stream: TStream; Component: TComponent);
|
||||
begin
|
||||
Stream.WriteComponentRes(Component.Name,Component);
|
||||
end;
|
||||
|
||||
procedure LoadComponentFromStream(Stream: TStream; Component: TComponent);
|
||||
procedure ComponentLoadFromStream(Stream: TStream; Component: TComponent);
|
||||
begin
|
||||
Stream.ReadComponentRes(Component);
|
||||
end;
|
||||
|
Reference in New Issue
Block a user