mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 17:59:22 +02:00
created a lfm for AddFileToAPackageDialog from Draius
git-svn-id: trunk@7374 -
This commit is contained in:
parent
244cd6023d
commit
aad303748d
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -1826,6 +1826,8 @@ lcl/widgetset/wsstdctrls.pp svneol=native#text/pascal
|
|||||||
lcl/widgetset/wstoolwin.pp svneol=native#text/pascal
|
lcl/widgetset/wstoolwin.pp svneol=native#text/pascal
|
||||||
lcl/xmlpropstorage.pas svneol=native#text/pascal
|
lcl/xmlpropstorage.pas svneol=native#text/pascal
|
||||||
/localize.sh -text svneol=native#application/x-sh
|
/localize.sh -text svneol=native#application/x-sh
|
||||||
|
packager/addfiletoapackagedlg.lfm svneol=native#text/plain
|
||||||
|
packager/addfiletoapackagedlg.lrs svneol=native#text/pascal
|
||||||
packager/addfiletoapackagedlg.pas svneol=native#text/pascal
|
packager/addfiletoapackagedlg.pas svneol=native#text/pascal
|
||||||
packager/addtopackagedlg.pas svneol=native#text/pascal
|
packager/addtopackagedlg.pas svneol=native#text/pascal
|
||||||
packager/basepkgmanager.pas svneol=native#text/pascal
|
packager/basepkgmanager.pas svneol=native#text/pascal
|
||||||
|
116
packager/addfiletoapackagedlg.lfm
Normal file
116
packager/addfiletoapackagedlg.lfm
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
object AddFileToAPackageDialog: TAddFileToAPackageDialog
|
||||||
|
Caption = 'AddFileToAPackageDialog'
|
||||||
|
ClientHeight = 362
|
||||||
|
ClientWidth = 448
|
||||||
|
OnClose = AddFileToAPackageDlgClose
|
||||||
|
PixelsPerInch = 112
|
||||||
|
Position = poScreenCenter
|
||||||
|
ShowHint = True
|
||||||
|
HorzScrollBar.Page = 447
|
||||||
|
VertScrollBar.Page = 361
|
||||||
|
Left = 573
|
||||||
|
Height = 362
|
||||||
|
Top = 331
|
||||||
|
Width = 448
|
||||||
|
object FileGroupBox: TGroupBox
|
||||||
|
BorderSpacing.OnChange = nil
|
||||||
|
Caption = 'FileGroupBox'
|
||||||
|
ClientHeight = 191
|
||||||
|
ClientWidth = 429
|
||||||
|
ParentColor = True
|
||||||
|
TabOrder = 0
|
||||||
|
Left = 8
|
||||||
|
Height = 208
|
||||||
|
Top = 8
|
||||||
|
Width = 433
|
||||||
|
object UnitNameLabel: TLabel
|
||||||
|
Caption = 'UnitNameLabel'
|
||||||
|
Color = clNone
|
||||||
|
Left = 12
|
||||||
|
Height = 17
|
||||||
|
Top = 40
|
||||||
|
Width = 404
|
||||||
|
end
|
||||||
|
object FileNameEdit: TEdit
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 0
|
||||||
|
Text = 'FileNameEdit'
|
||||||
|
Left = 12
|
||||||
|
Height = 23
|
||||||
|
Top = 8
|
||||||
|
Width = 404
|
||||||
|
end
|
||||||
|
object UnitNameEdit: TEdit
|
||||||
|
TabOrder = 1
|
||||||
|
Text = 'UnitNameEdit'
|
||||||
|
Left = 12
|
||||||
|
Height = 23
|
||||||
|
Top = 56
|
||||||
|
Width = 404
|
||||||
|
end
|
||||||
|
object HasRegisterProcCheckBox: TCheckBox
|
||||||
|
Caption = 'HasRegisterProcCheckBox'
|
||||||
|
TabOrder = 2
|
||||||
|
Left = 14
|
||||||
|
Height = 23
|
||||||
|
Top = 88
|
||||||
|
Width = 404
|
||||||
|
end
|
||||||
|
object FileTypeRadioGroup: TRadioGroup
|
||||||
|
Caption = 'FileTypeRadioGroup'
|
||||||
|
ParentColor = True
|
||||||
|
Left = 12
|
||||||
|
Height = 72
|
||||||
|
Top = 112
|
||||||
|
Width = 404
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object PackagesGroupBox: TGroupBox
|
||||||
|
Caption = 'PackagesGroupBox'
|
||||||
|
ClientHeight = 71
|
||||||
|
ClientWidth = 429
|
||||||
|
ParentColor = True
|
||||||
|
TabOrder = 1
|
||||||
|
Left = 8
|
||||||
|
Height = 88
|
||||||
|
Top = 232
|
||||||
|
Width = 433
|
||||||
|
object PackagesComboBox: TComboBox
|
||||||
|
MaxLength = 0
|
||||||
|
TabOrder = 0
|
||||||
|
Text = 'PackagesComboBox'
|
||||||
|
Left = 12
|
||||||
|
Height = 21
|
||||||
|
Top = 8
|
||||||
|
Width = 404
|
||||||
|
end
|
||||||
|
object ShowAllCheckBox: TCheckBox
|
||||||
|
Caption = 'ShowAllCheckBox'
|
||||||
|
OnClick = ShowAllCheckBoxClick
|
||||||
|
TabOrder = 1
|
||||||
|
Left = 12
|
||||||
|
Height = 23
|
||||||
|
Top = 40
|
||||||
|
Width = 404
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object CancelButton: TButton
|
||||||
|
Caption = 'CancelButton'
|
||||||
|
ModalResult = 2
|
||||||
|
TabOrder = 2
|
||||||
|
Left = 366
|
||||||
|
Height = 25
|
||||||
|
Top = 328
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object OkButton: TButton
|
||||||
|
BorderSpacing.OnChange = nil
|
||||||
|
Caption = 'OkButton'
|
||||||
|
OnClick = OkButtonClick
|
||||||
|
TabOrder = 3
|
||||||
|
Left = 280
|
||||||
|
Height = 25
|
||||||
|
Top = 328
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
end
|
34
packager/addfiletoapackagedlg.lrs
Normal file
34
packager/addfiletoapackagedlg.lrs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{ This is an automatically generated lazarus resource file }
|
||||||
|
|
||||||
|
LazarusResources.Add('TAddFileToAPackageDialog','FORMDATA',[
|
||||||
|
'TPF0'#24'TAddFileToAPackageDialog'#23'AddFileToAPackageDialog'#7'Caption'#6
|
||||||
|
+#23'AddFileToAPackageDialog'#12'ClientHeight'#3'j'#1#11'ClientWidth'#3#192#1
|
||||||
|
+#7'OnClose'#7#25'AddFileToAPackageDlgClose'#13'PixelsPerInch'#2'p'#8'Positio'
|
||||||
|
+'n'#7#14'poScreenCenter'#8'ShowHint'#9#18'HorzScrollBar.Page'#3#191#1#18'Ver'
|
||||||
|
+'tScrollBar.Page'#3'i'#1#4'Left'#3'='#2#6'Height'#3'j'#1#3'Top'#3'K'#1#5'Wid'
|
||||||
|
+'th'#3#192#1#0#9'TGroupBox'#12'FileGroupBox'#22'BorderSpacing.OnChange'#13#7
|
||||||
|
+'Caption'#6#12'FileGroupBox'#12'ClientHeight'#3#191#0#11'ClientWidth'#3#173#1
|
||||||
|
+#11'ParentColor'#9#8'TabOrder'#2#0#4'Left'#2#8#6'Height'#3#208#0#3'Top'#2#8#5
|
||||||
|
+'Width'#3#177#1#0#6'TLabel'#13'UnitNameLabel'#7'Caption'#6#13'UnitNameLabel'
|
||||||
|
+#5'Color'#7#6'clNone'#4'Left'#2#12#6'Height'#2#17#3'Top'#2'('#5'Width'#3#148
|
||||||
|
+#1#0#0#5'TEdit'#12'FileNameEdit'#8'ReadOnly'#9#8'TabOrder'#2#0#4'Text'#6#12
|
||||||
|
+'FileNameEdit'#4'Left'#2#12#6'Height'#2#23#3'Top'#2#8#5'Width'#3#148#1#0#0#5
|
||||||
|
+'TEdit'#12'UnitNameEdit'#8'TabOrder'#2#1#4'Text'#6#12'UnitNameEdit'#4'Left'#2
|
||||||
|
+#12#6'Height'#2#23#3'Top'#2'8'#5'Width'#3#148#1#0#0#9'TCheckBox'#23'HasRegis'
|
||||||
|
+'terProcCheckBox'#7'Caption'#6#23'HasRegisterProcCheckBox'#8'TabOrder'#2#2#4
|
||||||
|
+'Left'#2#14#6'Height'#2#23#3'Top'#2'X'#5'Width'#3#148#1#0#0#11'TRadioGroup'
|
||||||
|
+#18'FileTypeRadioGroup'#7'Caption'#6#18'FileTypeRadioGroup'#11'ParentColor'#9
|
||||||
|
+#4'Left'#2#12#6'Height'#2'H'#3'Top'#2'p'#5'Width'#3#148#1#0#0#0#9'TGroupBox'
|
||||||
|
+#16'PackagesGroupBox'#7'Caption'#6#16'PackagesGroupBox'#12'ClientHeight'#2'G'
|
||||||
|
+#11'ClientWidth'#3#173#1#11'ParentColor'#9#8'TabOrder'#2#1#4'Left'#2#8#6'Hei'
|
||||||
|
+'ght'#2'X'#3'Top'#3#232#0#5'Width'#3#177#1#0#9'TComboBox'#16'PackagesComboBo'
|
||||||
|
+'x'#9'MaxLength'#2#0#8'TabOrder'#2#0#4'Text'#6#16'PackagesComboBox'#4'Left'#2
|
||||||
|
+#12#6'Height'#2#21#3'Top'#2#8#5'Width'#3#148#1#0#0#9'TCheckBox'#15'ShowAllCh'
|
||||||
|
+'eckBox'#7'Caption'#6#15'ShowAllCheckBox'#7'OnClick'#7#20'ShowAllCheckBoxCli'
|
||||||
|
+'ck'#8'TabOrder'#2#1#4'Left'#2#12#6'Height'#2#23#3'Top'#2'('#5'Width'#3#148#1
|
||||||
|
+#0#0#0#7'TButton'#12'CancelButton'#7'Caption'#6#12'CancelButton'#11'ModalRes'
|
||||||
|
+'ult'#2#2#8'TabOrder'#2#2#4'Left'#3'n'#1#6'Height'#2#25#3'Top'#3'H'#1#5'Widt'
|
||||||
|
+'h'#2'K'#0#0#7'TButton'#8'OkButton'#22'BorderSpacing.OnChange'#13#7'Caption'
|
||||||
|
+#6#8'OkButton'#7'OnClick'#7#13'OkButtonClick'#8'TabOrder'#2#3#4'Left'#3#24#1
|
||||||
|
+#6'Height'#2#25#3'Top'#3'H'#1#5'Width'#2'K'#0#0#0
|
||||||
|
]);
|
@ -31,6 +31,7 @@
|
|||||||
Abstract:
|
Abstract:
|
||||||
The dialog for selecting the package to add a file to.
|
The dialog for selecting the package to add a file to.
|
||||||
}
|
}
|
||||||
|
|
||||||
unit AddFileToAPackageDlg;
|
unit AddFileToAPackageDlg;
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
@ -38,27 +39,29 @@ unit AddFileToAPackageDlg;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Forms, Controls, Buttons, ExtCtrls, StdCtrls,
|
Classes, SysUtils, LResources, Forms, Controls, Buttons, ExtCtrls, StdCtrls,
|
||||||
LazarusIDEStrConsts, Dialogs, {$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF},
|
LazarusIDEStrConsts, Dialogs, {$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF},
|
||||||
FileUtil, IDEProcs, IDEOptionDefs, ComponentReg, PackageDefs, PackageSystem;
|
FileUtil, IDEProcs, IDEOptionDefs, ComponentReg, PackageDefs, PackageSystem,
|
||||||
|
Arrow;
|
||||||
|
|
||||||
type
|
type
|
||||||
TAddFileToAPackageDlg = class(TForm)
|
|
||||||
FileGroupBox: TGroupBox;
|
{ TAddFileToAPackageDialog }
|
||||||
FileNameEdit: TEdit;
|
|
||||||
UnitNameLabel: TLabel;
|
TAddFileToAPackageDialog = class(TForm)
|
||||||
UnitNameEdit: TEdit;
|
CancelButton: TButton;
|
||||||
|
OkButton: TButton;
|
||||||
HasRegisterProcCheckBox: TCheckBox;
|
HasRegisterProcCheckBox: TCheckBox;
|
||||||
FileTypeRadioGroup: TRadioGroup;
|
FileTypeRadioGroup: TRadioGroup;
|
||||||
|
UnitNameEdit: TEdit;
|
||||||
|
FileNameEdit: TEdit;
|
||||||
|
FileGroupBox: TGroupBox;
|
||||||
PackagesGroupBox: TGroupBox;
|
PackagesGroupBox: TGroupBox;
|
||||||
|
UnitNameLabel: TLabel;
|
||||||
PackagesComboBox: TComboBox;
|
PackagesComboBox: TComboBox;
|
||||||
ShowAllCheckBox: TCheckBox;
|
ShowAllCheckBox: TCheckBox;
|
||||||
OkButton: TButton;
|
|
||||||
CancelButton: TButton;
|
|
||||||
procedure AddFileToAPackageDlgClose(Sender: TObject;
|
procedure AddFileToAPackageDlgClose(Sender: TObject;
|
||||||
var CloseAction: TCloseAction);
|
var CloseAction: TCloseAction);
|
||||||
procedure AddFileToAPackageDlgResize(Sender: TObject);
|
|
||||||
procedure FileGroupBoxResize(Sender: TObject);
|
|
||||||
procedure OkButtonClick(Sender: TObject);
|
procedure OkButtonClick(Sender: TObject);
|
||||||
procedure PackagesGroupBoxResize(Sender: TObject);
|
procedure PackagesGroupBoxResize(Sender: TObject);
|
||||||
procedure ShowAllCheckBoxClick(Sender: TObject);
|
procedure ShowAllCheckBoxClick(Sender: TObject);
|
||||||
@ -83,62 +86,40 @@ type
|
|||||||
property HasRegisterProc: boolean read GetHasRegisterProc write SetHasRegisterProc;
|
property HasRegisterProc: boolean read GetHasRegisterProc write SetHasRegisterProc;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function ShowAddFileToAPackageDlg(const Filename, UnitName: string;
|
function ShowAddFileToAPackageDlg(const Filename, UnitName: string;
|
||||||
HasRegisterProc: boolean): TModalResult;
|
HasRegisterProc: boolean): TModalResult;
|
||||||
|
|
||||||
|
|
||||||
|
var
|
||||||
|
AddFileToAPackageDialog: TAddFileToAPackageDialog;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|
||||||
function ShowAddFileToAPackageDlg(const Filename, UnitName: string;
|
function ShowAddFileToAPackageDlg(const Filename, UnitName: string;
|
||||||
HasRegisterProc: boolean): TModalResult;
|
HasRegisterProc: boolean): TModalResult;
|
||||||
var
|
var
|
||||||
Dialog: TAddFileToAPackageDlg;
|
AddFileToAPackageDialog: TAddFileToAPackageDialog;
|
||||||
begin
|
begin
|
||||||
Dialog:=TAddFileToAPackageDlg.Create(nil);
|
AddFileToAPackageDialog:=TAddFileToAPackageDialog.Create(nil);
|
||||||
Dialog.Filename:=Filename;
|
AddFileToAPackageDialog.Filename:=Filename;
|
||||||
Dialog.UnitName:=UnitName;
|
AddFileToAPackageDialog.UnitName:=UnitName;
|
||||||
Dialog.HasRegisterProc:=HasRegisterProc;
|
AddFileToAPackageDialog.HasRegisterProc:=HasRegisterProc;
|
||||||
Dialog.UpdateAvailablePackages;
|
AddFileToAPackageDialog.UpdateAvailablePackages;
|
||||||
Result:=Dialog.ShowModal;
|
Result:=AddFileToAPackageDialog.ShowModal;
|
||||||
Dialog.Free;
|
AddFileToAPackageDialog.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TAddFileToAPackageDlg }
|
{ TAddFileToAPackageDialog }
|
||||||
|
|
||||||
procedure TAddFileToAPackageDlg.AddFileToAPackageDlgClose(Sender: TObject;
|
procedure TAddFileToAPackageDialog.AddFileToAPackageDlgClose(Sender: TObject;
|
||||||
var CloseAction: TCloseAction);
|
var CloseAction: TCloseAction);
|
||||||
begin
|
begin
|
||||||
IDEDialogLayoutList.SaveLayout(Self);
|
IDEDialogLayoutList.SaveLayout(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAddFileToAPackageDlg.AddFileToAPackageDlgResize(Sender: TObject);
|
procedure TAddFileToAPackageDialog.OkButtonClick(Sender: TObject);
|
||||||
begin
|
|
||||||
with FileGroupBox do
|
|
||||||
SetBounds(10,10,Parent.ClientWidth-20,120);
|
|
||||||
|
|
||||||
with PackagesGroupBox do
|
|
||||||
SetBounds(10,FileGroupBox.Top+FileGroupBox.Height+5,Parent.ClientWidth-20,75);
|
|
||||||
|
|
||||||
with OkButton do
|
|
||||||
SetBounds(Parent.ClientWidth-200,Parent.ClientHeight-30,80,Height);
|
|
||||||
|
|
||||||
with CancelButton do
|
|
||||||
SetBounds(Parent.ClientWidth-100,Parent.ClientHeight-30,80,Height);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TAddFileToAPackageDlg.FileGroupBoxResize(Sender: TObject);
|
|
||||||
begin
|
|
||||||
with UnitNameLabel do
|
|
||||||
SetBounds(5,33,90,Height);
|
|
||||||
with UnitNameEdit do
|
|
||||||
SetBounds(UnitNameLabel.Left+UnitNameLabel.Width+3,30,250,Height);
|
|
||||||
with HasRegisterProcCheckBox do
|
|
||||||
SetBounds(5,60,200,Height);
|
|
||||||
|
|
||||||
with FileTypeRadioGroup do
|
|
||||||
SetBounds(0,30,Parent.ClientWidth,Parent.ClientHeight-30);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TAddFileToAPackageDlg.OkButtonClick(Sender: TObject);
|
|
||||||
var
|
var
|
||||||
PkgID: TLazPackageID;
|
PkgID: TLazPackageID;
|
||||||
APackage: TLazPackage;
|
APackage: TLazPackage;
|
||||||
@ -192,63 +173,32 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAddFileToAPackageDlg.PackagesGroupBoxResize(Sender: TObject);
|
procedure TAddFileToAPackageDialog.PackagesGroupBoxResize(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
with ShowAllCheckBox do
|
with ShowAllCheckBox do
|
||||||
SetBounds(10,30,200,Height);
|
SetBounds(10,30,200,Height);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAddFileToAPackageDlg.ShowAllCheckBoxClick(Sender: TObject);
|
procedure TAddFileToAPackageDialog.ShowAllCheckBoxClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
UpdateAvailablePackages;
|
UpdateAvailablePackages;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAddFileToAPackageDlg.SetupComponents;
|
procedure TAddFileToAPackageDialog.SetupComponents;
|
||||||
var
|
var
|
||||||
pft: TPkgFileType;
|
pft: TPkgFileType;
|
||||||
begin
|
begin
|
||||||
FileGroupBox:=TGroupBox.Create(Self);
|
FileGroupBox.Caption:=lisToDoLFile;
|
||||||
with FileGroupBox do begin
|
FileNameEdit.Text:='';
|
||||||
Name:='FileGroupBox';
|
UnitNameLabel.Caption:=lisAF2PUnitName;
|
||||||
Parent:=Self;
|
UnitNameEdit.Text:='';
|
||||||
Caption:=lisToDoLFile;
|
HasRegisterProcCheckBox.Caption:=lisAF2PHasRegisterProcedure;
|
||||||
OnResize:=@FileGroupBoxResize;
|
PackagesGroupBox.Caption:=lisAF2PDestinationPackage;
|
||||||
end;
|
ShowAllCheckBox.Caption:=lisAF2PShowAll;
|
||||||
|
OkButton.Caption:=lisLazBuildOk;
|
||||||
|
CancelButton.Caption:=dlgCancel;
|
||||||
|
|
||||||
FileNameEdit:=TEdit.Create(Self);
|
|
||||||
with FileNameEdit do begin
|
|
||||||
Name:='FileNameEdit';
|
|
||||||
Parent:=FileGroupBox;
|
|
||||||
Text:='';
|
|
||||||
Align:=alTop;
|
|
||||||
ReadOnly:=true;
|
|
||||||
end;
|
|
||||||
|
|
||||||
UnitNameLabel:=TLabel.Create(Self);
|
|
||||||
with UnitNameLabel do begin
|
|
||||||
Name:='UnitNameLabel';
|
|
||||||
Parent:=FileGroupBox;
|
|
||||||
Caption:=lisAF2PUnitName;
|
|
||||||
end;
|
|
||||||
|
|
||||||
UnitNameEdit:=TEdit.Create(Self);
|
|
||||||
with UnitNameEdit do begin
|
|
||||||
Name:='UnitNameEdit';
|
|
||||||
Parent:=FileGroupBox;
|
|
||||||
Text:='';
|
|
||||||
end;
|
|
||||||
|
|
||||||
HasRegisterProcCheckBox:=TCheckBox.Create(Self);
|
|
||||||
with HasRegisterProcCheckBox do begin
|
|
||||||
Name:='HasRegisterProcCheckBox';
|
|
||||||
Parent:=FileGroupBox;
|
|
||||||
Caption:=lisAF2PHasRegisterProcedure;
|
|
||||||
end;
|
|
||||||
|
|
||||||
FileTypeRadioGroup:=TRadioGroup.Create(Self);
|
|
||||||
with FileTypeRadioGroup do begin
|
with FileTypeRadioGroup do begin
|
||||||
Name:='FileTypeRadioGroup';
|
|
||||||
Parent:=FileGroupBox;
|
|
||||||
Caption:=lisAF2PFileType;
|
Caption:=lisAF2PFileType;
|
||||||
with Items do begin
|
with Items do begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
@ -261,49 +211,9 @@ begin
|
|||||||
ItemIndex:=0;
|
ItemIndex:=0;
|
||||||
Columns:=2;
|
Columns:=2;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
PackagesGroupBox:=TGroupBox.Create(Self);
|
|
||||||
with PackagesGroupBox do begin
|
|
||||||
Name:='PackagesGroupBox';
|
|
||||||
Parent:=Self;
|
|
||||||
Caption:=lisAF2PDestinationPackage;
|
|
||||||
OnResize:=@PackagesGroupBoxResize;
|
|
||||||
end;
|
|
||||||
|
|
||||||
PackagesComboBox:=TComboBox.Create(Self);
|
|
||||||
with PackagesComboBox do begin
|
|
||||||
Name:='PackagesComboBox';
|
|
||||||
Parent:=PackagesGroupBox;
|
|
||||||
Align:=alTop;
|
|
||||||
end;
|
|
||||||
|
|
||||||
ShowAllCheckBox:=TCheckBox.Create(Self);
|
|
||||||
with ShowAllCheckBox do begin
|
|
||||||
Name:='ShowAllCheckBox';
|
|
||||||
Parent:=PackagesGroupBox;
|
|
||||||
Caption:=lisAF2PShowAll;
|
|
||||||
Checked:=false;
|
|
||||||
OnClick:=@ShowAllCheckBoxClick;
|
|
||||||
end;
|
|
||||||
|
|
||||||
OkButton:=TButton.Create(Self);
|
|
||||||
with OkButton do begin
|
|
||||||
Name:='OkButton';
|
|
||||||
Parent:=Self;
|
|
||||||
Caption:=lisLazBuildOk;
|
|
||||||
OnClick:=@OkButtonClick;
|
|
||||||
end;
|
|
||||||
|
|
||||||
CancelButton:=TButton.Create(Self);
|
|
||||||
with CancelButton do begin
|
|
||||||
Name:='CancelButton';
|
|
||||||
Parent:=Self;
|
|
||||||
Caption:=dlgCancel;
|
|
||||||
ModalResult:=mrCancel;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAddFileToAPackageDlg.SetFilename(const AValue: string);
|
procedure TAddFileToAPackageDialog.SetFilename(const AValue: string);
|
||||||
var
|
var
|
||||||
NewPFT: TPkgFileType;
|
NewPFT: TPkgFileType;
|
||||||
begin
|
begin
|
||||||
@ -324,24 +234,24 @@ begin
|
|||||||
FileType:=NewPFT;
|
FileType:=NewPFT;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAddFileToAPackageDlg.SetHasRegisterProc(const AValue: boolean);
|
procedure TAddFileToAPackageDialog.SetHasRegisterProc(const AValue: boolean);
|
||||||
begin
|
begin
|
||||||
if HasRegisterProc=AValue then exit;
|
if HasRegisterProc=AValue then exit;
|
||||||
HasRegisterProcCheckBox.Checked:=AValue;
|
HasRegisterProcCheckBox.Checked:=AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAddFileToAPackageDlg.SetUnitName(const AValue: string);
|
procedure TAddFileToAPackageDialog.SetUnitName(const AValue: string);
|
||||||
begin
|
begin
|
||||||
if UnitName=AValue then exit;
|
if UnitName=AValue then exit;
|
||||||
UnitNameEdit.Text:=AValue;
|
UnitNameEdit.Text:=AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TAddFileToAPackageDlg.GetFilename: string;
|
function TAddFileToAPackageDialog.GetFilename: string;
|
||||||
begin
|
begin
|
||||||
Result:=FileNameEdit.Text;
|
Result:=FileNameEdit.Text;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TAddFileToAPackageDlg.GetFileType: TPkgFileType;
|
function TAddFileToAPackageDialog.GetFileType: TPkgFileType;
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
CurPFT: TPkgFileType;
|
CurPFT: TPkgFileType;
|
||||||
@ -362,17 +272,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TAddFileToAPackageDlg.GetHasRegisterProc: boolean;
|
function TAddFileToAPackageDialog.GetHasRegisterProc: boolean;
|
||||||
begin
|
begin
|
||||||
Result:=HasRegisterProcCheckBox.Checked;
|
Result:=HasRegisterProcCheckBox.Checked;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TAddFileToAPackageDlg.GetUnitName: string;
|
function TAddFileToAPackageDialog.GetUnitName: string;
|
||||||
begin
|
begin
|
||||||
Result:=UnitNameEdit.Text;
|
Result:=UnitNameEdit.Text;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAddFileToAPackageDlg.SetFileType(const AValue: TPkgFileType);
|
procedure TAddFileToAPackageDialog.SetFileType(const AValue: TPkgFileType);
|
||||||
var
|
var
|
||||||
ShowUnitProps: Boolean;
|
ShowUnitProps: Boolean;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
@ -397,27 +307,22 @@ begin
|
|||||||
FileTypeRadioGroup.Visible:=not ShowUnitProps;
|
FileTypeRadioGroup.Visible:=not ShowUnitProps;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TAddFileToAPackageDlg.Create(TheOwner: TComponent);
|
constructor TAddFileToAPackageDialog.Create(TheOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
Name:='AddFileToAPackageDlg';
|
|
||||||
Caption:=lisAF2PAddFileToAPackage;
|
Caption:=lisAF2PAddFileToAPackage;
|
||||||
fPackages:=TAVLTree.Create(@CompareLazPackageID);
|
fPackages:=TAVLTree.Create(@CompareLazPackageID);
|
||||||
Position:=poScreenCenter;
|
IDEDialogLayoutList.ApplyLayout(Self,448,362);
|
||||||
IDEDialogLayoutList.ApplyLayout(Self,320,170);
|
|
||||||
SetupComponents;
|
SetupComponents;
|
||||||
OnClose:=@AddFileToAPackageDlgClose;
|
|
||||||
OnResize:=@AddFileToAPackageDlgResize;
|
|
||||||
OnResize(Self);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TAddFileToAPackageDlg.Destroy;
|
destructor TAddFileToAPackageDialog.Destroy;
|
||||||
begin
|
begin
|
||||||
fPackages.Free;
|
fPackages.Free;
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAddFileToAPackageDlg.UpdateAvailablePackages;
|
procedure TAddFileToAPackageDialog.UpdateAvailablePackages;
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
APackage: TLazPackage;
|
APackage: TLazPackage;
|
||||||
@ -458,5 +363,7 @@ begin
|
|||||||
sl.Free;
|
sl.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
initialization
|
||||||
|
{$I addfiletoapackagedlg.lrs}
|
||||||
|
|
||||||
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user