Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Показать сообщение отдельно

SHVtYW4=


Сообщения: 3451
Благодарности: 1273

Профиль | Отправить PM | Цитировать


TAY50N,

читать дальше »
Код: Выделить весь код
[Code]
 var
 SystemPage: TWizardPage;
 ModNameLabel: TNewStaticText;
 MouseLabel, SiteLabel: TLabel;

 GamePathPanel, GameVersPanel, GameModPanel: TPanel;
 FindGamePath, FindGameVers, FindGameMod, ReqSatisfy: TNewStaticText;
 GamePathMemo, GameVersMemo, GameModMemo, GamePathFindMemo, GameVersFindMemo, GameModFindMemo: TPanel;
 RenameCheckBox: TNewCheckBox;

 //процедуры, для использования скина (Tiger.cjstyles)
 procedure LoadSkin(lpszPath: PAnsiChar; lpszIniFileName: PAnsiChar); external 'LoadSkin@{tmp}\isskin.dll stdcall delayload';
 procedure UnloadSkin; external 'UnloadSkin@{tmp}\isskin.dll stdcall delayload';
 function ShowWindow(hWnd: Integer; uType: Integer): Integer; external 'ShowWindow@user32.dll stdcall';

 //процедуры, которые выполняются при наведении на ссылку (левый нижний угол)
 procedure SiteLabelOnClick(Sender: TObject); var ErrorCode: Integer;
 begin
 ShellExec('open', 'http:\\defir.uniogame.com', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
 end;

 procedure SiteLabelMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 begin
 SiteLabel.Font.Color := clRed;
 end;

 procedure SiteLabelMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 begin
 SiteLabel.Font.Color := WizardForm.Font.Color;
 end;

 procedure SiteLabelMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
 begin
 SiteLabel.Font.Color := clRed;
 end;

 procedure SiteLabelMouseMove2(Sender: TObject; Shift: TShiftState; X, Y: Integer);
 begin
 SiteLabel.Font.Color := WizardForm.Font.Color;
 end;

 procedure RedesignWizardForm;
 begin
 with WizardForm do
 begin
 Color := clBlack;
 WelcomePage.Color := clBlack;
 FinishedPage.Color := clBlack;
 Font.Color := clWhite;
 Font.Style := [fsBold];
 Font.Size := 9;
 ClientWidth := ScaleX(690);
 ClientHeight := ScaleY(459);
 Caption := ExpandConstant('{#SetupSetting("AppName")}');
 Center;
 end;

 with WizardForm.OuterNotebook do
 begin
 SetBounds(ScaleX(223), ScaleY(60), ScaleX(467), ScaleY(350));
 end;

 with WizardForm.InnerNotebook do
 begin
 SetBounds(WizardForm.InnerNotebook.Left - ScaleX(25), ScaleY(50), ScaleX(420), ScaleY(260));
 end;

 with WizardForm.InnerPage do
 begin
 Color := clBlack;
 end;

 with WizardForm.Bevel do
 begin
 SetBounds(ScaleX(0), ScaleY(410), ScaleX(690), ScaleY(2));
 end;

 with WizardForm.Bevel1 do
 begin
 Parent := WizardForm;
 SetBounds(ScaleX(0), ScaleY(58), ScaleX(690), ScaleY(2));
 end;

 with WizardForm.MainPanel do
 begin
 Parent := WizardForm;
 SetBounds(ScaleX(0), ScaleY(0), ScaleX(690), ScaleY(58));
 end;

 with WizardForm.WizardSmallBitmapImage do
 begin
 Left := ScaleX(633);
 end;

 with WizardForm.CancelButton do
 begin
 Left := ScaleX(590);
 Top := ScaleY(425);
 Font.Name := 'Tahoma';
 Font.Size := 8;
 Font.Style := [];
 end;

 with WizardForm.NextButton do
 begin
 Left := ScaleX(500);
 Top := ScaleY(425);
 Font.Name := 'Tahoma';
 Font.Size := 8;
 Font.Style := [];
 end;

 with WizardForm.BackButton do
 begin
 Left := ScaleX(410);
 Top := ScaleY(425);
 Font.Name := 'Tahoma';
 Font.Size := 8;
 Font.Style := [];
 end;

 with WizardForm.ReadyMemo do
 begin
 SetBounds(ScaleX(0), ScaleY(30), ScaleX(417), ScaleY(220));
 end;

 ModNameLabel := TNewStaticText.Create(WizardForm);
 with ModNameLabel do
 begin
 Parent := WizardForm.MainPanel;
 Font.Size := 22;
 Font.Name := 'Courier New';
 Font.Style := [fsBold];
 Font.Color := clWindowText;
 SetBounds(ScaleX(50), ScaleY(15), ScaleX(200), ScaleY(50));
 Caption := ExpandConstant('{#SetupSetting("AppName")}');
 end;

 MouseLabel := TLabel.Create(WizardForm);
 with MouseLabel do
 begin
 Parent := WizardForm;
 Width := WizardForm.Width;
 Height := WizardForm.Height;
 Autosize := False;
 Transparent := True;
 OnMouseMove := @SiteLabelMouseMove2;
 end;

 SiteLabel := TLabel.Create(WizardForm);
 with SiteLabel do
 begin
 Caption := ExpandConstant('{#SetupSetting("AppPublisherURL")}');
 Parent := WizardForm;
 Left := ScaleX(15);
 Top := ScaleY(425);
 Font.Name := 'Courier New';
 Cursor := crHand;
 OnClick := @SiteLabelOnClick;
 OnMouseDown := @SiteLabelMouseDown;
 OnMouseUp := @SiteLabelMouseUp;
 OnMouseMove := @SiteLabelMouseMove;
 end;
 end;

 //************************************************ [Начало - Компоненты страниц] ***************************************************//

 ////////////////////// WelcomePage //////////////////////

 procedure CreatePageComponents;
 begin

 with WizardForm.WizardBitmapImage do
 begin
 Parent := WizardForm;
 SetBounds(ScaleX(0), ScaleY(60), ScaleX(223), ScaleY(350));
 end;

 with TLabel.Create(WizardForm) do
 begin
 Caption := WizardForm.WelcomeLabel1.Caption;
 Parent := WizardForm.WelcomePage;
 Alignment := taCenter;
 AutoSize := False;
 Wordwrap := True;
 Font.Name := 'Courier New';
 Font.Size := 14;
 Font.Style := [fsBold];
 Transparent := True;
 SetBounds(ScaleX(30), ScaleY(45), ScaleX(407), ScaleY(45));
 end;

 with WizardForm.WelcomeLabel2 do
 begin
 Font.Name := 'Courier New';
 SetBounds(ScaleX(30), ScaleY(140), ScaleX(407), ScaleY(239));
 end;

 ////////////////////// WelcomePage //////////////////////

 with WizardForm.PageNameLabel do
 begin
 Height := ScaleY(20);
 Font.Name := 'Courier New';
 Font.Size := 12;
 Font.Color := WizardForm.Font.Color;
 end;

 with WizardForm.PageDescriptionLabel do
 begin
 Top := WizardForm.PageDescriptionLabel.Top + ScaleY(8);
 Height := ScaleY(15);
 Width := ScaleX(500);
 Font.Name := 'Courier New';
 end;

 ////////////////////// SelectDirPage //////////////////////

 WizardForm.SelectDirLabel.Font.Name := 'Courier New';

 with WizardForm.SelectDirBrowseLabel do
 begin
 Height := ScaleY(30);
 Font.Name := 'Courier New';
 end;

 with WizardForm.DirEdit do
 begin
 Top := ScaleY(50);
 Font.Size := 8;
 Font.Name := 'Courier New';
 Parent := WizardForm.SelectComponentsPage;
 end;

 with WizardForm.DirBrowseButton do
 begin
 Top := ScaleY(49);
 Font.Name := 'Tahoma';
 Font.Size := 8;
 Font.Style := [];
 Parent := WizardForm.SelectComponentsPage;
 end;

 with WizardForm.DiskSpaceLabel do
 begin
 Top := ScaleY(245);
 Font.Name := 'Courier New';
 end;

 ////////////////////// SelectDirPage //////////////////////

 ////////////////////// SelectComponentsPage //////////////////////

 with WizardForm.SelectComponentsLabel do
 begin
 Height := ScaleY(30);
 Font.Name := 'Courier New';
 end;

 with WizardForm.TypesCombo do
 begin
 Top := ScaleY(45);
 Font.Name := 'Courier New';
 end;

 with WizardForm.ComponentsList do
 begin
 Top := ScaleY(80);
 Height := ScaleY(155);
 Font.Name := 'Tahoma';
 Font.Size := 8;
 Font.Style := [];
 end;

 with WizardForm.ComponentsDiskSpaceLabel do
 begin
 Top := ScaleY(245);
 Font.Name := 'Courier New';
 end;

 ////////////////////// SelectComponentsPage //////////////////////

 ////////////////////// SelectProgramGroupPage //////////////////////

 with WizardForm.SelectStartMenuFolderLabel do
 begin
 Font.Name := 'Courier New';
 end;

 with WizardForm.SelectStartMenuFolderBrowseLabel do
 begin
 Height := ScaleY(30);
 Font.Name := 'Courier New';
 end;

 with WizardForm.GroupEdit do
 begin
 Top := ScaleY(100);
 Font.Name := 'Courier New';
 Font.Size := 8;
 end;

 with WizardForm.GroupBrowseButton do
 begin
 Top := ScaleY(99);
 Font.Name := 'Tahoma';
 Font.Size := 8;
 Font.Style := [];
 end;

 with WizardForm.NoIconsCheck do
 begin
 Top := ScaleY(245);
 Font.Name := 'Courier New';
 Width := ScaleX(250);
 end;

 ////////////////////// SelectProgramGroupPage //////////////////////

 ////////////////////// ReadyPage //////////////////////

 WizardForm.ReadyLabel.Font.Name := 'Courier New';
 WizardForm.ReadyMemo.Font.Name := 'Courier New';

 ////////////////////// ReadyPage //////////////////////

 ////////////////////// InstallingPage //////////////////////

 WizardForm.StatusLabel.Font.Name := 'Courier New';
 WizardForm.ProgressGauge.SetBounds(ScaleX(0), ScaleY(60), ScaleX(417), ScaleY(30));

 with WizardForm.FilenameLabel do
 begin
 Top := ScaleY(20);
 Font.Name := 'Courier New';
 Font.Style := [];
 end;

 ////////////////////// InstallingPage //////////////////////

 ////////////////////// FinishedPage //////////////////////

 with WizardForm.WizardBitmapImage2 do
 begin
 Parent := WizardForm;
 SetBounds(ScaleX(0), ScaleY(60), ScaleX(223), ScaleY(350));
 end;

 with TLabel.Create(WizardForm) do
 begin
 Caption := WizardForm.FinishedHeadingLabel.Caption;
 Parent := WizardForm.FinishedPage;
 Alignment := taCenter;
 AutoSize := False;
 Wordwrap := True;
 Font.Name := 'Courier New';
 Font.Size := 14;
 Font.Style := [fsBold];
 Transparent := True;
 SetBounds(ScaleX(30), ScaleY(45), ScaleX(407), ScaleY(45));
 end;

 with WizardForm.FinishedLabel do
 begin
 Font.Name := 'Courier New';
 SetBounds(ScaleX(30), ScaleY(130), ScaleX(407), ScaleY(239));
 end;
 end;

 ////////////////////// FinishedPage //////////////////////

 ////////////////////// UninstallingPage //////////////////////

 procedure RedesignUninstallProgressForm;
 var
 UninstallBitmapImage: TBitmapImage;
 begin
 with UninstallProgressForm do
 begin
 Color := clBlack;
 Font.Color := clWhite;
 Font.Style := [fsBold];
 Font.Name := 'Courier New';
 Font.Size := 9;
 ClientWidth := ScaleX(690);
 ClientHeight := ScaleY(459);
 Caption := ExpandConstant('{#SetupSetting("AppName")}');
 Center;

 OuterNotebook.SetBounds(ScaleX(223), ScaleY(60), ScaleX(467), ScaleY(351));
 InnerNotebook.SetBounds(UninstallProgressForm.InnerNotebook.Left - ScaleX(25), ScaleY(50), ScaleX(460), ScaleY(260));
 InnerPage.Color := clBlack;
 Bevel.SetBounds(ScaleX(0), ScaleY(410), ScaleX(690), ScaleY(2));
 StatusLabel.Top := ScaleY(0);
 ProgressBar.SetBounds(UninstallProgressForm.StatusLabel.Left, ScaleY(50), ScaleX(417), ScaleY(30));
 end;

 with UninstallProgressForm.PageNameLabel do
 begin
 Height := ScaleY(20);
 Font.Name := UninstallProgressForm.Font.Name;
 Font.Size := 12;
 Font.Color := UninstallProgressForm.Font.Color;
 end;

 with UninstallProgressForm.PageDescriptionLabel do
 begin
 Top := UninstallProgressForm.PageDescriptionLabel.Top + ScaleY(8);
 Height := ScaleY(15);
 Width := ScaleX(500);
 end;

 UninstallBitmapImage := TBitmapImage.Create(UninstallProgressForm);
 with UninstallBitmapImage do
 begin
 Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardImage.bmp'));
 Parent := UninstallProgressForm;
 SetBounds(ScaleX(0), ScaleY(60), ScaleX(223), ScaleY(350));
 end;

 with UninstallProgressForm.WizardSmallBitmapImage do
 begin
 Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardSmallImage.bmp'));
 Left := ScaleX(633);
 end;

 with UninstallProgressForm.Bevel1 do
 begin
 Parent := UninstallProgressForm;
 SetBounds(ScaleX(0), ScaleY(58), ScaleX(690), ScaleY(2));
 end;

 with UninstallProgressForm.MainPanel do
 begin
 Parent := UninstallProgressForm;
 SetBounds(ScaleX(0), ScaleY(0), ScaleX(690), ScaleY(58));
 end;

 with UninstallProgressForm.CancelButton do
 begin
 Left := ScaleX(590);
 Top := ScaleY(425);
 Font.Name := 'Tahoma';
 Font.Size := 8;
 Font.Style := [];
 end;
 end;

 ////////////////////// UninstallingPage //////////////////////

 //************************************************ [Конец - Компоненты страниц] ***************************************************//

 procedure ShowComponents(CurPageID: Integer);
 begin
 WizardForm.PageNameLabel.Show;
 WizardForm.PageDescriptionLabel.Show;
 ModNameLabel.Hide;
 WizardForm.WelcomeLabel1.Hide;
 WizardForm.FinishedHeadingLabel.Hide;

 case CurPageID of
 wpWelcome:
 begin
 WizardForm.PageNameLabel.Hide;
 WizardForm.PageDescriptionLabel.Hide;
 ModNameLabel.Show;
 end;
 wpFinished:
 begin
 WizardForm.PageNameLabel.Hide;
 WizardForm.PageDescriptionLabel.Hide;
 ModNameLabel.Show;
 WizardForm.NextButton.Left := ScaleX(590);
 end;
 end;
 end;

 function InitializeSetup: Boolean;
 begin
 ExtractTemporaryFile('isskin.dll');
 ExtractTemporaryFile('Tiger.cjstyles');

 LoadSkin(ExpandConstant('{tmp}\Tiger.cjstyles'), '');
 Result:=True;
 end;

 procedure InitializeWizard();
 begin
 RedesignWizardForm;
 CreatePageComponents;
 end;

 procedure CurPageChanged(CurPageID: Integer);
 begin
 ShowComponents(CurPageID);
 end;

 procedure DeinitializeSetup;
 begin
 ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
 UnloadSkin;
 end;

 function InitializeUninstall: Boolean;
 begin
 FileCopy(ExpandConstant('{app}\isskin.dll'), ExpandConstant('{tmp}\isskin.dll'), False);
 FileCopy(ExpandConstant('{app}\Tiger.cjstyles'), ExpandConstant('{tmp}\Tiger.cjstyles'), False);
 FileCopy(ExpandConstant('{app}\WizardImage.bmp'), ExpandConstant('{tmp}\WizardImage.bmp'), False);
 FileCopy(ExpandConstant('{app}\WizardSmallImage.bmp'), ExpandConstant('{tmp}\WizardSmallImage.bmp'), False);
 LoadSkin(ExpandConstant('{tmp}\Tiger.cjstyles'), '');
 Result:=True;
 end;

 procedure InitializeUninstallProgressForm;
 begin
 RedesignUninstallProgressForm;
 end;

 procedure DeinitializeUninstall;
 begin
 UnloadSkin;
 end;
Это сообщение посчитали полезным следующие участники:

Отправлено: 22:18, 24-01-2014 | #1930