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