Inno-Setup-issrc/Projects/Src/IDE.FilesDesignerForm.pas

82 lines
2.0 KiB
ObjectPascal
Raw Permalink Normal View History

unit IDE.FilesDesignerForm;
2024-03-21 09:07:07 +01:00
{
Inno Setup
Copyright (C) 1997-2024 Jordan Russell
Portions by Martijn Laan
For conditions of distribution and use, see LICENSE.TXT.
Files Designer form
}
2024-03-21 09:07:07 +01:00
interface
uses
2024-03-22 09:31:10 +01:00
Classes, Controls, Forms, Dialogs, ExtCtrls, StdCtrls,
UIStateForm, NewStaticText, DropListBox, IDE.Wizard.WizardFormFilesHelper;
2024-03-21 09:07:07 +01:00
type
2024-03-22 10:51:26 +01:00
TFilesDesignerForm = class(TUIStateForm)
2024-03-21 09:07:07 +01:00
Panel1: TPanel;
2024-03-22 11:02:41 +01:00
InsertButton: TButton;
2024-03-21 10:10:45 +01:00
CancelButton: TButton;
2024-03-21 09:07:07 +01:00
AppFilesEditButton: TButton;
AppFilesRemoveButton: TButton;
AppFilesAddDirButton: TButton;
AppFilesAddButton: TButton;
AppFilesListBox: TDropListBox;
AppFilesLabel: TNewStaticText;
NotCreateAppDirCheck: TCheckBox;
Bevel1: TBevel;
2024-03-21 09:07:07 +01:00
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
2024-03-22 11:02:41 +01:00
procedure InsertButtonClick(Sender: TObject);
2024-03-21 09:07:07 +01:00
private
2024-03-21 09:54:32 +01:00
FFilesHelper: TWizardFormFilesHelper;
2024-03-21 09:07:07 +01:00
function GetText: String;
procedure SetCreateAppDir(const Value: Boolean);
2024-03-21 09:07:07 +01:00
public
property CreateAppDir: Boolean write SetCreateAppDir;
2024-03-21 09:07:07 +01:00
property Text: string read GetText;
end;
implementation
{$R *.dfm}
uses
IDE.HelperFunc;
2024-03-22 10:51:26 +01:00
procedure TFilesDesignerForm.FormCreate(Sender: TObject);
2024-03-21 09:07:07 +01:00
begin
InitFormFont(Self);
2024-04-10 21:40:53 +02:00
FFilesHelper := TWizardFormFilesHelper.Create(Self,
2024-03-22 09:31:10 +01:00
NotCreateAppDirCheck, AppFilesListBox, AppFilesAddButton, AppFilesAddDirButton,
2024-03-22 11:02:41 +01:00
AppFilesEditButton, AppFilesRemoveButton);
end;
2024-03-22 10:51:26 +01:00
procedure TFilesDesignerForm.FormDestroy(Sender: TObject);
begin
2024-03-21 09:54:32 +01:00
FFilesHelper.Free;
2024-03-21 09:07:07 +01:00
end;
procedure TFilesDesignerForm.SetCreateAppDir(const Value: Boolean);
begin
NotCreateAppDirCheck.Checked := not Value;
end;
2024-03-22 10:51:26 +01:00
function TFilesDesignerForm.GetText: String;
2024-03-21 09:07:07 +01:00
begin
2024-03-22 09:31:10 +01:00
Result := '';
FFilesHelper.AddScript(Result);
2024-03-21 09:07:07 +01:00
end;
2024-03-22 11:02:41 +01:00
procedure TFilesDesignerForm.InsertButtonClick(Sender: TObject);
begin
if FFilesHelper.FilesCount = 0 then
ModalResult := mrCancel;
end;
2024-03-21 09:07:07 +01:00
end.