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.09a
Signed-off-by: Dennis07 <den.goehlert@t-online.de>
This commit is contained in:
Binary file not shown.
@@ -14,6 +14,7 @@ object fmMain: TfmMain
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
@@ -123,13 +124,22 @@ object fmMain: TfmMain
|
||||
Width = 201
|
||||
Height = 103
|
||||
Center = True
|
||||
Stretch = True
|
||||
end
|
||||
object edImage: TEdit
|
||||
Left = 16
|
||||
Top = 129
|
||||
Width = 169
|
||||
Height = 21
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
OnChange = edImageChange
|
||||
OnExit = edImageExit
|
||||
end
|
||||
object btImage: TButton
|
||||
Left = 191
|
||||
@@ -138,6 +148,7 @@ object fmMain: TfmMain
|
||||
Height = 21
|
||||
Caption = '...'
|
||||
TabOrder = 1
|
||||
OnClick = btImageClick
|
||||
end
|
||||
end
|
||||
object pnButtons: TPanel
|
||||
@@ -179,7 +190,20 @@ object fmMain: TfmMain
|
||||
end
|
||||
end
|
||||
object SplashScreen: TSplashScreen
|
||||
OnTimer = SplashScreenTimer
|
||||
SplashForm.BorderStyle = bsDialog
|
||||
SplashForm.BorderIcons = [biSystemMenu]
|
||||
SplashProgressBar.Position = 60
|
||||
SplashTimer.Enabled = True
|
||||
SplashTimer.Interval = 500
|
||||
Left = 368
|
||||
Top = 186
|
||||
end
|
||||
object OpenPictureDialog: TOpenPictureDialog
|
||||
Filter = 'Alle (*.bmp; *.gif; *.jpg; *.jpeg)|*.bmp;*.gif;*.jpg;*.jpeg'
|
||||
Options = [ofReadOnly, ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofNoTestFileCreate, ofNoNetworkButton, ofNoDereferenceLinks, ofDontAddToRecent]
|
||||
OptionsEx = [ofExNoPlacesBar]
|
||||
Left = 336
|
||||
Top = 186
|
||||
end
|
||||
end
|
||||
|
@@ -1,11 +1,15 @@
|
||||
unit uMain;
|
||||
|
||||
{$IF CompilerVersion <> 26.0}
|
||||
{$MESSAGE ERROR 'This example was written to compile under Delphi XE5'}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
|
||||
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, uFrmCtrls, uBase, uSysTools,
|
||||
Vcl.ExtCtrls;
|
||||
Vcl.ExtCtrls, Vcl.Imaging.jpeg, Vcl.ExtDlgs;
|
||||
|
||||
type
|
||||
TfmMain = class(TForm)
|
||||
@@ -29,6 +33,7 @@ type
|
||||
laAnimation: TLabel;
|
||||
coAnimation: TComboBox;
|
||||
SplashScreen: TSplashScreen;
|
||||
OpenPictureDialog: TOpenPictureDialog;
|
||||
procedure btShowClick(Sender: TObject);
|
||||
procedure SplashScreenTimer(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
@@ -37,6 +42,10 @@ type
|
||||
procedure edAlphaChange(Sender: TObject);
|
||||
procedure edCaptionChange(Sender: TObject);
|
||||
procedure cbAlphaClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure btImageClick(Sender: TObject);
|
||||
procedure edImageExit(Sender: TObject);
|
||||
procedure edImageChange(Sender: TObject);
|
||||
private
|
||||
{ Private-Deklarationen }
|
||||
public
|
||||
@@ -50,6 +59,17 @@ implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfmMain.btImageClick(Sender: TObject);
|
||||
begin
|
||||
if OpenPictureDialog.Execute = True then
|
||||
begin
|
||||
if FileExists(OpenPictureDialog.FileName) = True then
|
||||
begin
|
||||
edImage.Text := OpenPictureDialog.FileName;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfmMain.btShowClick(Sender: TObject);
|
||||
begin
|
||||
SplashScreen.SplashForm.Width := StrToInt(edWidth.Text);
|
||||
@@ -110,6 +130,27 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfmMain.edImageChange(Sender: TObject);
|
||||
begin
|
||||
if edImage.Text = 'Background.jpg' then
|
||||
begin
|
||||
edImage.Font.Color := clGray;
|
||||
end else
|
||||
begin
|
||||
edImage.Font.Color := clWindowText;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfmMain.edImageExit(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
imImage.Picture.LoadFromFile(edImage.Text);
|
||||
except
|
||||
edImage.Text := 'Background.jpg';
|
||||
imImage.Picture.LoadFromFile(edImage.Text);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfmMain.edWidthChange(Sender: TObject);
|
||||
begin
|
||||
if StrIsInt(edWidth.Text) = False then
|
||||
@@ -119,6 +160,12 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfmMain.FormCreate(Sender: TObject);
|
||||
begin
|
||||
SplashScreen.SplashImage.Picture.LoadFromFile('Background.jpg');
|
||||
edImage.Text := 'Background.jpg';
|
||||
end;
|
||||
|
||||
procedure TfmMain.FormShow(Sender: TObject);
|
||||
begin
|
||||
edWidth.Text := IntToStr(SplashScreen.SplashForm.Width);
|
||||
@@ -145,11 +192,10 @@ begin
|
||||
SplashScreen.SplashProgressBar.Position := SplashScreen.SplashProgressBar.Position + 10;
|
||||
end else
|
||||
begin
|
||||
SplashScreen.SplashProgressBar.Position := 0;
|
||||
SplashScreen.Hide;
|
||||
SplashScreen.SplashTimer.Enabled := False;
|
||||
SplashScreen.ApplyChanges;
|
||||
end;
|
||||
//showmessage(inttostr(splashscreen.SplashProgressBar.Position));
|
||||
//SplashScreen.ApplyChanges;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@@ -13,4 +13,8 @@ https://bitbucket.org/Dennis07/lina-components/wiki/Home
|
||||
|
||||
Please note that the code of Lina Components is available under
|
||||
Mozilla Public License (MPL) 2.0, see "Information\License.txt" for
|
||||
more details.
|
||||
more details.
|
||||
The public changes done since version 1.00 are listed in the
|
||||
"Information\Changelog.txt" file and for a list of all contributors
|
||||
and supporters please have a look at the "Information\Credits.txt"
|
||||
file.
|
@@ -1,4 +1,4 @@
|
||||
These statistics cover the official repository of Lina Components.
|
||||
|
||||
Total lines of code (LoC): 4800+
|
||||
Total lines of code (LoC): 5300+
|
||||
Total visual components (VC): 13
|
@@ -1,44 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject>
|
||||
<Transactions>
|
||||
<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.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.325,=dbrtl.dcp</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\uBattery.pas=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uSysCtrls.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.592,=C:\Users\Dennis\Documents\RAD Studio\Projekte\LinaComponents\uFileTools.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.791,=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.809,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Resource\Lina.rc</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.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.414,C:\Users\Dennis\Documents\RAD Studio\Projekte\LinaComponents\uLinaTest.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.809,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Resource\Lina.rc</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.318,=vcl.dcp</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.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.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.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.556,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uLocalMgr.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.318,=vcl.dcp</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.555,=C:\Users\Dennis\Documents\RAD Studio\Projekte\LinaComponents\uBase.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.143,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Package\Delphi_XE5\Untitled1.htm</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.837,=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.672,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\uFrmCtrls.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.686,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\uSysTools.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.633,=C:\Users\Dennis\Documents\RAD Studio\Projekte\LinaComponents\uLocalMgr.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.525,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uCrypt.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.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.672,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\uFrmCtrls.pas</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.566,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Source\uScriptMgr.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.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.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.045,=IndyProtocols.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.799,=PascalScript_Core_D19.dcp</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.857,=PascalScript_Core_D19.dcp</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.799,=PascalScript_Core_D19.dcp</Transaction>
|
||||
</Transactions>
|
||||
<ProjectSortOrder AutoSort="0" SortType="0">
|
||||
<File Path="..\..\..\LinaComponents"/>
|
||||
@@ -48,9 +51,9 @@
|
||||
<File Path="..\..\Resource\Compiled\uFrmCtrls.dcr"/>
|
||||
<File Path="..\..\Resource\Compiled\uLocalMgr.dcr"/>
|
||||
<File Path="..\..\Resource\Compiled\uScriptMgr.dcr"/>
|
||||
<File Path="..\..\Resource\Compiled\uSysCtrls.dcr"/>
|
||||
<File Path="..\..\Resource\Compiled\uVirtObj.dcr"/>
|
||||
<File Path="..\..\Resource\Compiled\uWebCtrls.dcr"/>
|
||||
<File Path="..\..\Resource\Compiled\uSysCtrls.dcr"/>
|
||||
<File Path="..\..\Source"/>
|
||||
<File Path="..\..\Source\uAdvCtrls.pas"/>
|
||||
<File Path="..\..\Source\uBase.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.
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,7 +6,7 @@ unit uBase;
|
||||
/// (c) 2014 Dennis G�hlert a.o. ///
|
||||
//////////////////////////////////////
|
||||
|
||||
{$IF CompilerVersion < 18.0}
|
||||
{$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.
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -83,6 +83,11 @@ type
|
||||
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: 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);
|
||||
{ Sonstige }
|
||||
function SecToTime(const Sec: Cardinal): TTime;
|
||||
function SystemLanguage: String;
|
||||
@@ -143,6 +148,40 @@ begin
|
||||
Result := (Ceil(Value) = Floor(Value));
|
||||
end;
|
||||
|
||||
procedure SaveComponentToFile(const FileName: String; Component: TComponent);
|
||||
var
|
||||
FS: TFileStream;
|
||||
begin
|
||||
FS := TFileStream.Create(FileName,fmCreate);
|
||||
try
|
||||
FS.WriteComponentRes(Component.Name,Component);
|
||||
finally
|
||||
FS.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure LoadComponentFromFile(const FileName: String; Component: TComponent);
|
||||
var
|
||||
FS: TFileStream;
|
||||
begin
|
||||
FS := TFileStream.Create(FileName,fmOpenRead or fmShareDenyNone);
|
||||
try
|
||||
FS.ReadComponentRes(Component);
|
||||
finally
|
||||
FS.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure SaveComponentToStream(var Stream: TStream; Component: TComponent);
|
||||
begin
|
||||
Stream.WriteComponentRes(Component.Name,Component);
|
||||
end;
|
||||
|
||||
procedure LoadComponentFromStream(Stream: TStream; Component: TComponent);
|
||||
begin
|
||||
Stream.ReadComponentRes(Component);
|
||||
end;
|
||||
|
||||
function SecToTime(const Sec: Cardinal): TTime;
|
||||
var
|
||||
TH, TM, TS: String;
|
||||
@@ -295,7 +334,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
function FontSizeToHeight(Size: Integer; PpI: Integer): Integer;
|
||||
begin
|
||||
Result := - Size * PpI div 72;
|
||||
|
@@ -65,8 +65,8 @@ type
|
||||
function GetProgressPercent: Byte;
|
||||
{ Herunterladen }
|
||||
function GetText: String;
|
||||
procedure SaveToFile(FileName: TFileName);
|
||||
procedure SaveToStream(Stream: TStream);
|
||||
procedure SaveToFile(const FileName: TFileName);
|
||||
procedure SaveToStream(var Stream: TStream);
|
||||
published
|
||||
{ Published-Deklarationen }
|
||||
{ Ereignisse }
|
||||
@@ -316,12 +316,12 @@ begin
|
||||
Result := idHTTPObject.Get(Address);
|
||||
end;
|
||||
|
||||
procedure TDownload.SaveToFile(FileName: TFileName);
|
||||
procedure TDownload.SaveToFile(const FileName: TFileName);
|
||||
var
|
||||
FS: TFileStream;
|
||||
begin
|
||||
Prepare;
|
||||
FS := TFileStream.Create(FileName, fmCreate or fmShareDenyWrite);
|
||||
FS := TFileStream.Create(FileName,fmCreate or fmShareDenyWrite);
|
||||
try
|
||||
idHTTPObject.Get(Address,FS);
|
||||
finally
|
||||
@@ -329,7 +329,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TDownload.SaveToStream(Stream: TStream);
|
||||
procedure TDownload.SaveToStream(var Stream: TStream);
|
||||
begin
|
||||
Prepare;
|
||||
idHTTPObject.Get(Address,Stream);
|
||||
|
Reference in New Issue
Block a user