1
0
mirror of https://bitbucket.org/Dennis07/lina-components.git synced 2025-08-24 21:49:04 +02:00

Version 1.0 DEV 1.11e

Signed-off-by: Dennis07 <den.goehlert@t-online.de>
This commit is contained in:
Dennis07
2014-11-16 12:10:44 +01:00
parent fb0d5bd508
commit 62559dcad1
23 changed files with 375 additions and 38 deletions

View File

@@ -1,6 +1,7 @@
; FEEDBACK-PROGRAM LANGUAGES
; (ONE SECTION FOR EACH LANGUAGE)
; TO CHANGE THE DEFAULT LANGUAGE, EDIT FB_CONFIG.RES FILE
; GERMAN LANGUAGE IS HARD-CODED AND DEFAULT!
[English]
; APPLICATION
000=Feedback
@@ -29,7 +30,7 @@
122=The program did not work correctly
123=The program could not be launched
124=The program hang-up
125=The program demaged my system
125=The program damaged my system
; TAB #2
200=Problems
210=The program had problems
@@ -46,6 +47,8 @@
410=Wishes and suggestions:
420=Other annotations:
; ------------------------------------------------
; ITALIAN
; TRANSLATION BY: Francesco Martella
[Italiano]
; L'APPLICAZIONE
000=Feedback
@@ -89,4 +92,146 @@
; TAB # 4
400=Suggerimenti
410=Richieste e suggerimenti:
420=Altre annotazioni:
420=Altre annotazioni:
; ------------------------------------------------
; NORWEGIAN
; TRANSLATION BY: Lennart von Aasenden
[Norsk]
; APPLICATION
000=Tilbakemelding
001=Tilbakemelding-Program
002=Tilbakemelding filer
003=Eksportere Tilbakemelding fil...
; DIALOGS (NEWLINE: &)
004=Gir du tillatelse til � inkludere anonyme data for statistiske form�l i din tilbakemelding? Dette hjelper oss � forbedre kvaliteten for fremtiden. Data vidref�res ikke til tredjeparter.
005=Husk og gi oss din rating, fra en til fem stjerner!
006=Takk for at du deltar i v�rt feedback program! Dine data lagres som FBK filer som du kan laste opp. Vil du �pne et nettleser vinue og laste opp filene n�?
; MAIN FORM
010=Instillinger
011=Spr�k:
012=Program:
013=Versjon:
021=Avslutt
022=Fortsett
; TAB #1
100=Vanlig
111=Utilfredstillende
112=Adekvat
113=Bra
114=Utmerket
115=Perfekt
121=programmet sluttet uventet � virke
122=Programmet fungerte ikke som det skal
123=Klarte ikke � starte programmet
124=Programmet fryser eller henger seg opp
125=Programmet skadet mitt system
; TAB #2
200=Problem
210=Programmet opplever problemer
220=Problem beskrivelse
; TAB #3
300=Rating
301=D�rlig
302=Bra
310=Grafisk presentasjon:
320=Praktisk handling:
330=Funksjonalitet:
; TAB #4
400=Forslag
410=�nsker og forslag:
420=Andre kommentarer:
; ------------------------------------------------
; INDONESIAN
; TRANSLATION BY: Kayra Lyra
[Indonesia]
; APLIKASI
000=Umpan Balik
001=Umpan balik-Program
002=Berkas umpan balik
003=Ekspor berkas umpan balik...
; DIALOGS (NEWLINE: &)
004=Apakah kami diizinkan untuk memasukkan beberapa data yang tidak dikenali untuk tujuan statistik dalam umpan balik Anda? dan ini membantu kami untuk membuat program kami lebih baik untuk para pengguna kami di masa depan. dan kami tidak akan mempublikasi data Anda.
005=Silakan pilih rate untuk program dengan 1 sampai 5 bintang!
006=Terima kasih untuk partisipasi Anda pada program umpan balik kami! & Data Anda telah disimpan dalam berkas FBK khusus yang dapat Anda unggah sekarang. & Apakah Anda ingin membuka halaman web browser untuk mengunggah berkas umpan balik?
; FORM UTAMA
010=Pengaturan
011=Bahasa:
012=Program:
013=Versi:
021=Keluar
022=Lanjutkan
; TAB #1
100=Biasa
111=Kurang Memuaskan
112=Dapat diterima
113=Baik
114=Luar biasa
115=Sempurna
121=Program ini sering tidak berfungsi tiba-tiba
122=Program ini tidak bekerja secara benar
123=Program ini tidak bisa dibuka
124=Program ini rusak
125=Program ini merusak sistem saya
; TAB #2
200=Permasalahan
210=Program ini memiliki masalah
220=Penjabaran masalah
; TAB #3
300=Pilihan
301=Buruk
302=Baik
310=Tampilan yag bagu
320=Perawatan yang mudah
330=Nilai fungsionalitas
; TAB #4
400=Saran
410=Harapan dan saran:
420=Catatan lain:
; ------------------------------------------------
; POLISH
; TRANSLATION BY: David Ratajczak
[Polski]
; APPLICATION
000=Feedback
001=Program feedback
002=Pliki feedback
003=Export pliku...
; DIALOGS (NEWLINE: &)
004=Czy wolno nam uzywac kilka anonimowych danych dla cel�w statystycznych? To pomaga nam, aby nasze programy lepsze dla naszych uzytkownik�w
& Nie bedzie publikacji danych.
005=Prosze glosowac na program z jednej do pieciu gwiazdek!
006=Dziekujemy za udzial w naszym programie zwrotnego! & Twoje dane zostaly zapisane w specjalnych plikach FBK kt�re mozna przesylac juz teraz. & Chcialbys otworzyc strone dla przesylania plik�w?
; MAIN FORM
010=Ustawienia
011=Jezyk:
012=Program:
013=Wersja:
021=Zakonc
022=Dalej
; TAB #1
100=Og�lnie
111=Niezadowalajace
112=Zadowalajace
113=Dobre
114=Bardzo dobre
115=Perfekcyjne
121=Program zostal wylaczony nie sprawiedliwie
122=Program nie dzialal sprawiedliwie
123=Program nie mogl by odpalony
124=Program sie zawiesil
125=Program uszkodzil moj system
; TAB #2
200=Problemy
210=Program mial problemy
220=Opis problemu
; TAB #3
300=Ocenianie
301=Zle
302=Dobrze
310=Wyglad:
320=Uzywanie:
330=Funkcjonowanie:
; TAB #4
400=Sugestie
410=Sugestie i zyczenia:
420=Dodatki:

View File

@@ -0,0 +1,5 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut]
IDList=
URL=http://www.patreon.com/dennis07

View File

@@ -0,0 +1,5 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,11
[InternetShortcut]
IDList=
URL=https://www.facebook.com/groups/137012246341854/

View File

@@ -1,4 +1,4 @@
These statistics cover the official repository of Lina Components.
Total lines of code (LoC): 6500+
Total lines of code (LoC): 6700+
Total visual components (VC): 15

BIN
Resource/Bitmap/Lina.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

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.

View File

@@ -32,7 +32,7 @@ unit uBase;
vermeiden. }
{$DEFINE NO_GENERIC}
{$IFEND}
{$IF CompilerVersion < 20.0}
{$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
@@ -41,6 +41,9 @@ unit uBase;
in UnicodeStrings umwandelt und umgekehrt (sofern m�glich). }
{$DEFINE NO_UNICODE}
{$IFEND}
{$DEFINE ADDSPLASHENTRY}
{$DEFINE ADDABOUTENTRY}
interface
@@ -48,7 +51,7 @@ interface
uses
{ Standard-Units }
SysUtils, Classes, Dialogs;
SysUtils, Classes, Dialogs, Graphics, ToolsAPI;
type
TComponentAbout = class
@@ -75,12 +78,38 @@ type
procedure AboutDlg;
end;
procedure RegisterPackageOnSplash;
procedure RegisterPackageOnAbout;
const
ComponentsPage = 'Lina';
About_Title = 'About...';
Package_Name = 'Lina Components';
Package_Description = 'Components and source library for Delphi';
Package_License = 'Mozilla Public License (MPL) 2.0';
Package_SKU = '(Dev-Preview)';
implementation
procedure RegisterPackageOnSplash;
var
SplashBitmap: TBitmap;
begin
SplashBitmap := TBitmap.Create;
try
SplashBitmap.LoadFromFile('..\..\Resource\Lina.bmp');
(ToolsAPI.SplashScreenServices as IOTASplashScreenServices).AddPluginBitmap(
Package_Name,SplashBitmap.Handle,False,Package_License,Package_SKU);
finally
SplashBitmap.Free;
end;
end;
procedure RegisterPackageOnAbout;
begin
end;
constructor TComponentAbout.Create(Comp: ShortString = ''; Ver: Single = 1.0;
Copy: ShortString = ''; Auth: ShortString = ''; Home: ShortString = '');
begin
@@ -112,4 +141,9 @@ begin
[mbClose],0)
end;
initialization
{$IFDEF ADDSPLASHENTRY}
RegisterPackageOnSplash;
{$ENDIF}
end.

View File

@@ -123,6 +123,10 @@ type
function ExtractDriveChar(const FileName: String): Char;
function DriveCharToFileDir(DriveChar: Char): ShortString;
function DriveCharToFilePath(DriveChar: Char): ShortString;
function DriveByteToDriveChar(DriveByte: Byte): Char;
function DriveCharToDriveByte(DriveChar: Char): Byte;
function DriveExists(DriveByte: Byte): Boolean;
function GetDriveTypeChar(DriveByte: Byte): UINT;
function FileTimeToDateTime(FileTime: TFileTime): TDateTime;
function ConvertFileSize(const InputSize: Int64; ConvertFactor: ShortInt = -1): Extended;
function GetFileSize(FileName: String): Int64;
@@ -495,6 +499,26 @@ begin
Result := DriveCharToFileDir(DriveChar) + PathDelim;
end;
function DriveByteToDriveChar(DriveByte: Byte): Char;
begin
Result := Chr(DriveByte + Ord('A'));
end;
function DriveCharToDriveByte(DriveChar: Char): Byte;
begin
Result := Ord(DriveChar) - Ord('A');
end;
function DriveExists(DriveByte: Byte): Boolean;
begin
Result := (GetLogicalDrives and (1 shl DriveByte) <> 0);
end;
function GetDriveTypeChar(DriveByte: Byte): UINT;
begin
Result := GetDriveType(PChar(String(DriveCharToFilePath(DriveByteToDriveChar(DriveByte)))));
end;
function FileTimeToDateTime(FileTime: TFileTime): TDateTime;
var
LocalTime: TFileTime;

View File

@@ -435,6 +435,7 @@ type
property References: TParamReferences read FReferences write SetReferences;
end;
procedure SetTaskBarVisibe(const Value: Boolean);
procedure ListParams(var OutList: TStrings);
function StringFromParam(Ident,Value: String; Format: TParamFormat): String;
function StringFromParamRef(ParamRef: TParamReference; UseDefVal: Boolean = True): String;
@@ -471,6 +472,21 @@ begin
RegisterComponents(ComponentsPage,[TSplashScreen,TProgressBarManager,TListBoxManager,TParamDefiner]);
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;

View File

@@ -10,7 +10,7 @@ interface
uses
{ Standard-Units }
SysUtils, Classes,
SysUtils, Classes, Windows,
{ Andere Package-Units }
uBase, uSysTools;
@@ -18,33 +18,40 @@ type
{ Fehlermeldungen }
EInvalidFormat = class(Exception);
ELanguageTagExists = class(Exception);
ELocalizationParse = class(Exception);
type
{ Hilfsklassen }
TLanguageTag = String[3];
TComponentDetectMode = (cdTag,cdName);
TCommentAllow = type TLinePosition;
type
{ Hauptklassen }
TLocalizationFormat = class(TPersistent)
private
{ Private-Deklarationen }
FAllowComment: TCommentAllow;
FComment: ShortString;
FSeparator: ShortString;
FHeader: ShortString;
FIndent: ShortString;
{ Methoden }
procedure SetComment(Value: ShortString);
procedure SetSeparator(Value: ShortString);
procedure SetHeader(Value: ShortString);
procedure SetIndent(Value: ShortString);
public
{ Public-Deklarationen }
constructor Create;
destructor Destroy; override;
published
{ Published-Deklarationen }
property Comment: ShortString read FComment write SetComment;
property Separator: ShortString read FSeparator write SetSeparator;
property AllowComment: TCommentAllow read FAllowComment write FAllowComment default lpAnyPosition;
property Comment: ShortString read FComment write SetComment; //nicht leer
property Separator: ShortString read FSeparator write SetSeparator; //nicht leer
property Header: ShortString read FHeader write SetHeader;
property Indent: ShortString read FIndent write SetIndent;
end;
TLocalization = class(TCollectionItem)
@@ -62,13 +69,14 @@ type
procedure SetFormat(Value: TLocalizationFormat);
protected
{ Protected-Deklarationen }
procedure RaiseParseError(Msg: String; LineIndex, CharIndex: Integer);
public
{ Public-Deklarationen }
constructor Create(Collection: TCollection); overload; override;
constructor Create(Collection: TCollection; const AFileName: TFileName); overload;
destructor Destroy; override;
function Check: Boolean; overload;
function Check(const Line: Integer): Boolean; overload;
//function Check: Boolean; overload;
//function Check(const Line: Integer): Boolean; overload;
procedure Apply;
published
{ Published-Deklarationen }
@@ -144,6 +152,7 @@ end;
constructor TLocalizationFormat.Create;
begin
inherited;
FAllowComment := lpAnyPosition;
FComment := ';';
FSeparator := '=';
FHeader := '*';
@@ -159,7 +168,7 @@ procedure TLocalizationFormat.SetComment(Value: ShortString);
var
Index: Integer;
begin
if ArrayPos(Value,[FSeparator,FHeader]) <> -1 then
if (ArrayPos(Value,[FSeparator,FHeader,FIndent]) <> -1) or (Length(Value) = 0) then
begin
raise EInvalidFormat.Create('Invalid param format for property: "Comment"');
end;
@@ -177,7 +186,7 @@ procedure TLocalizationFormat.SetSeparator(Value: ShortString);
var
Index: Integer;
begin
if (ArrayPos(Value,[FComment,FHeader]) <> -1) or (Length(Value) = 0) then
if (ArrayPos(Value,[FComment,FHeader,FIndent]) <> -1) or (Length(Value) = 0) then
begin
raise EInvalidFormat.Create('Invalid param format for property: "Separator"');
end;
@@ -195,7 +204,7 @@ procedure TLocalizationFormat.SetHeader(Value: ShortString);
var
Index: Integer;
begin
if ArrayPos(Value,[FComment,FSeparator]) <> -1 then
if ArrayPos(Value,[FComment,FSeparator,FIndent]) <> -1 then
begin
raise EInvalidFormat.Create('Invalid param format for property: "Header"');
end;
@@ -209,6 +218,24 @@ begin
FHeader := Value;
end;
procedure TLocalizationFormat.SetIndent(Value: ShortString);
var
Index: Integer;
begin
if ArrayPos(Value,[FComment,FSeparator,FHeader]) <> -1 then
begin
raise EInvalidFormat.Create('Invalid param format for property: "Header"');
end;
for Index := 1 to Length(Value) do
begin
if Value[Index] in Spaces then
begin
raise EInvalidFormat.Create('Invalid param format for property: "Header"');
end;
end;
FIndent := Value;
end;
{ ----------------------------------------------------------------------------
TLocalization
---------------------------------------------------------------------------- }
@@ -265,46 +292,89 @@ begin
FFormat := Value;
end;
function TLocalization.Check: Boolean;
var
Index: Integer;
procedure TLocalization.RaiseParseError(Msg: String; LineIndex, CharIndex: Integer);
begin
for Index := 0 to Lines.Count do
begin
Check(Index);
end;
raise ELocalizationParse.Create('[' + IntToStr(LineIndex) + '.' + IntToStr(CharIndex) + ']' + ' ' + Msg);
end;
function TLocalization.Check(const Line: Integer): Boolean;
{function TLocalization.Apply(const Line: Integer): Boolean;
var
Index: Integer;
LineStr: String;
InComment: Boolean;
InSeparator: Boolean;
InHeader: Boolean;
InIndex: Byte;
InPart: array [3] of Byte; //0 = Header; 1 = Separator; 2 = Indent
begin
Result := True;
LineStr := Lines.Strings[Index];
for Index := 1 to Length(LineStr) do
{ Standardwerte }
{ InPart[0] := 0;
InPart[1] := 0;
InPart[2] := 0;
{ Parse }
{ for Index := 1 to Length(LineStr) do
begin
if LineStr[Index] in Spaces then
begin
Continue;
end;
end;
end;
end; }
procedure TLocalization.Apply;
var
LineIndex: Integer;
CharIndex: Integer;
Line: String;
Identifier: ShortString;
Value: String;
Expr: String;
Header: Boolean;
Position: (posPrefix,posIndent,posSeparator,posValue);
begin
if Check = True then
for LineIndex := 0 to Lines.Count - 1 do
begin
//...
(Collection as TLocalizations).Manager.FCurrent := Index;
end else
begin
//...
Line := Lines.Strings[LineIndex];
for CharIndex := 1 to Length(Line) do
begin
if Expr = Format.Comment then
begin
end;
if Line[CharIndex] in Spaces then
begin
case Position of
//[>PRE<] Indent SEP Value
posPrefix:
//PRE [>Indent<] SEP Value
// posIndent: if Length(Expr then
//PRE Indent [>SEP<] Value
// posSeparator: if Expr = Format.Separator then
begin
Position := posValue;
Continue;
end;
//PRE Indent SEP [>Value<]
posValue: Expr := Expr + Line[CharIndex];
end;
end;
end;
{ Auf vollst�ndigkeit pr�fen... }
case Position of
posPrefix: RaiseParseError('Prefix expected, but end of line found',LineIndex,CharIndex);
posIndent: if Header = True then
begin
RaiseParseError('Header expected, but end of line found',LineIndex,CharIndex);
end else
begin
RaiseParseError('Indent expected, but end of line found',LineIndex,CharIndex);
end;
posSeparator: RaiseParseError('Definition expected, but end of line found',LineIndex,CharIndex);
end;
end;
//--------------------------------
(Collection as TLocalizations).Manager.FCurrent := Index;
end;
{ ----------------------------------------------------------------------------

View File

@@ -24,7 +24,8 @@ type
type
{ Hilfsklassen }
TStringFilterMode = (sfmAnyPosition,sfmBeginning);
TLinePosition = (lpAnyPosition,lpBeginning); //Mutter-Hilfsklasse f�r s�mtliche Enums
TStringFilterMode = type TLinePosition;
TStringFilterOptions = set of (sfoCaseSensitive,sfoForceTrim,sfoDefaultVisible);
type
@@ -61,7 +62,7 @@ type
property Filtered: Boolean read FFiltered write FFiltered default True;
property Filter: String read FFilter write FFilter;
property FilteredStrings: TStrings read GetFilteredStrings;
property FilterMode: TStringFilterMode read FFilterMode write FFilterMode default sfmBeginning;
property FilterMode: TStringFilterMode read FFilterMode write FFilterMode default lpBeginning;
property FilterOptions: TStringFilterOptions read FFilterOptions write FFilterOptions default [sfoCaseSensitive,sfoForceTrim,sfoDefaultVisible];
end;
@@ -100,6 +101,8 @@ type
function RoundPos(Number: Extended; Pos: Byte): Extended;
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;
@@ -365,6 +368,41 @@ begin
Result := - Height * 72 div PpI;
end;
function ComponentByTag(Owner: TComponent; const Tag: Integer): TComponent;
var
Index: Integer;
begin
for Index := 0 to Owner.ComponentCount - 1 do
begin
if Owner.Components[Index].Tag = Tag then
begin
Result := Owner.Components[Index];
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;
end;
procedure PrintText(Strings: TStrings; Font: TFont);
var
Index: Integer;
@@ -495,7 +533,7 @@ begin
inherited;
FFilteredStrings := TStringList.Create;
FFiltered := True;
FFilterMode := sfmBeginning;
FFilterMode := lpBeginning;
FFilterOptions := [sfoCaseSensitive,sfoForceTrim,sfoDefaultVisible];
end;
@@ -540,8 +578,8 @@ begin
StringValue := Trim(StringValue);
end;
StringPos := Pos(FilterValue,StringValue);
if (((FilterMode = sfmBeginning) and (StringPos = 1)) or
((FilterMode = sfmAnyPosition) and (StringPos > 0))) or
if (((FilterMode = lpBeginning) and (StringPos = 1)) or
((FilterMode = lpAnyPosition) and (StringPos > 0))) or
((Length(FilterValue) = 0) and (sfoDefaultVisible in FilterOptions)) then
begin
FFilteredStrings.Add(Strings[Index]);