[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
//#include "include\Components\Components.iss"
[Components]
Name: main; Description: Основные компоненты; Flags: checkablealone
Name: main\ass; Description: Установить ассоциации:; Flags: checkablealone
Name: main\ass\ani; Description: *.ani;
[code]
var
resize: boolean;
procedure ShiftDown(Control: TControl; DeltaY: Integer; restore: boolean);
begin
if restore then
Control.Top := Control.Top - DeltaY else
Control.Top := Control.Top + DeltaY;
end;
procedure ShiftRight(Control: TControl; DeltaX: Integer; restore: boolean);
begin
if restore then
Control.Left := Control.Left - DeltaX else
Control.Left := Control.Left + DeltaX;
end;
procedure ShiftDownAndRight(Control: TControl; DeltaX, DeltaY: Integer; restore: boolean);
begin
if restore then
begin
ShiftDown(Control, DeltaY, true);
ShiftRight(Control, DeltaX, true);
end else
begin
ShiftDown(Control, DeltaY, false);
ShiftRight(Control, DeltaX, false);
end;
end;
procedure GrowDown(Control: TControl; DeltaY: Integer; restore: boolean);
begin
if restore then
Control.Height := Control.Height - DeltaY else
Control.Height := Control.Height + DeltaY;
end;
procedure GrowRight(Control: TControl; DeltaX: Integer; restore: boolean);
begin
if restore then
Control.Width := Control.Width - DeltaX else
Control.Width := Control.Width + DeltaX;
end;
procedure GrowRightAndDown(Control: TControl; DeltaX, DeltaY: Integer; restore: boolean);
begin
if restore then
begin
GrowRight(Control, DeltaX, true);
GrowDown(Control, DeltaY, true);
end else
begin
GrowRight(Control, DeltaX, false);
GrowDown(Control, DeltaY, false);
end;
end;
procedure GrowRightAndShiftDown(Control: TControl; DeltaX, DeltaY: Integer; restore: boolean);
begin
if restore then
begin
GrowRight(Control, DeltaX, true);
ShiftDown(Control, DeltaY, true);
end else
begin
GrowRight(Control, DeltaX, false);
ShiftDown(Control, DeltaY, false);
end;
end;
procedure GrowWizard(DeltaX, DeltaY: Integer; restore: boolean);
begin
if (restore <> true) then
begin
GrowRightAndDown(WizardForm, DeltaX, DeltaY, false);
with WizardForm do
begin
GrowRightAndShiftDown(Bevel, DeltaX, DeltaY, false);
ShiftDownAndRight(CancelButton, DeltaX, DeltaY, false);
ShiftDownAndRight(NextButton, DeltaX, DeltaY, false);
ShiftDownAndRight(BackButton, DeltaX, DeltaY, false);
GrowRightAndDown(OuterNotebook, DeltaX, DeltaY, false);
GrowRight(BeveledLabel, DeltaX, false);
GrowRight(MainPanel, DeltaX, false);
ShiftRight(WizardSmallBitmapImage, DeltaX, false);
GrowRight(PageDescriptionLabel, DeltaX, false);
GrowRight(PageNameLabel, DeltaX, false);
GrowRight(Bevel1, DeltaX, false);
GrowRightAndDown(InnerNotebook, DeltaX, DeltaY, false);
GrowRightAndShiftDown(ComponentsDiskSpaceLabel, DeltaX, DeltaY, false);
GrowRightAndDown(ComponentsList, DeltaX, DeltaY, false);
GrowRight(TypesCombo, DeltaX, false);
GrowRight(SelectComponentsLabel, DeltaX, false);
end;
end
else
begin
if resize <> false then
begin
resize := false;
GrowRightAndDown(WizardForm, DeltaX, DeltaY, true);
with WizardForm do
begin
GrowRightAndShiftDown(Bevel, DeltaX, DeltaY, true);
ShiftDownAndRight(CancelButton, DeltaX, DeltaY, true);
ShiftDownAndRight(NextButton, DeltaX, DeltaY, true);
ShiftDownAndRight(BackButton, DeltaX, DeltaY, true);
GrowRightAndDown(OuterNotebook, DeltaX, DeltaY, true);
GrowRight(BeveledLabel, DeltaX, true);
GrowRight(MainPanel, DeltaX, true);
ShiftRight(WizardSmallBitmapImage, DeltaX, true);
GrowRight(PageDescriptionLabel, DeltaX, true);
GrowRight(PageNameLabel, DeltaX, true);
GrowRight(Bevel1, DeltaX, true);
GrowRightAndDown(InnerNotebook, DeltaX, DeltaY, true);
GrowRightAndShiftDown(ComponentsDiskSpaceLabel, DeltaX, DeltaY, true);
GrowRightAndDown(ComponentsList, DeltaX, DeltaY, true);
GrowRight(TypesCombo, DeltaX, true);
GrowRight(SelectComponentsLabel, DeltaX, true);
end;
end;
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpSelectComponents then
begin
GrowWizard(ScaleX(150), ScaleY(150), false);
resize := true;
end else GrowWizard(ScaleX(150), ScaleY(150), true);
end;