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.09a

Signed-off-by: Dennis07 <den.goehlert@t-online.de>
This commit is contained in:
Dennis07
2014-09-24 23:50:17 +02:00
parent 3e8fc65d23
commit 6de12fccc1
23 changed files with 882 additions and 279 deletions

View File

@@ -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

View File

@@ -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.