| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- unit IDE.FilesDesignerForm;
- {
- Inno Setup
- Copyright (C) 1997-2025 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;
- AppFilesAddDownloadButton: TButton;
- 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,
- AppFilesAddDownloadButton, 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.
|