Окно настроек. Вызов из главного окна. Неокончательно.

This commit is contained in:
Anthony Axenov 2019-01-20 19:20:45 +08:00
parent d9a9332907
commit f20447a54d
8 changed files with 3782 additions and 24 deletions

View File

@ -75,7 +75,7 @@
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="7">
<Units Count="8">
<Unit0>
<Filename Value="ABTool.lpr"/>
<IsPartOfProject Value="True"/>
@ -116,6 +116,13 @@
<IsPartOfProject Value="True"/>
<UnitName Value="uPackageList"/>
</Unit6>
<Unit7>
<Filename Value="foptions.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="fmOptions"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="fOptions"/>
</Unit7>
</Units>
</ProjectOptions>
<CompilerOptions>

View File

@ -12,7 +12,7 @@ uses {$IFDEF UNIX} {$IFDEF UseCThreads}
uFileUtils,
uPackage,
uPackageUtils,
uPackageList;
uPackageList, fOptions;
{$R *.res}
@ -21,6 +21,7 @@ begin
Application.Initialize;
Application.CreateForm(TdmMain, dmMain);
Application.CreateForm(TfmMain, fMain.fmMain);
Application.CreateForm(TfmOptions, fmOptions);
Application.Run;
end.

View File

@ -2,9 +2,9 @@ object dmMain: TdmMain
OnCreate = DataModuleCreate
OldCreateOrder = False
Height = 84
HorizontalOffset = 313
HorizontalOffset = 301
VerticalOffset = 612
Width = 717
Width = 810
PPI = 96
object imgIcons: TImageList
left = 32
@ -3852,6 +3852,7 @@ object dmMain: TdmMain
BF63FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
ImageIndex = 4
OnClick = mbOptonsMainClick
end
object mbOptionsPkg: TMenuItem
Caption = 'Управление пакетами...'

View File

@ -5,7 +5,8 @@ unit dMain;
interface
uses
Classes, SysUtils, FileUtil, Controls, Menus, VirtualTrees, uPackage, uPackageList;
Classes, SysUtils, FileUtil, Controls, Menus, VirtualTrees, uPackage,
uPackageList, fOptions;
type
@ -41,6 +42,7 @@ type
procedure mbCheckNoneClick(Sender: TObject);
procedure mbCollapseTreeClick(Sender: TObject);
procedure mbExpandTreeClick(Sender: TObject);
procedure mbOptonsMainClick(Sender: TObject);
procedure mbRefreshClick(Sender: TObject);
private
// Подготовка директорий
@ -174,6 +176,11 @@ begin
end;
end;
procedure TdmMain.mbOptonsMainClick(Sender: TObject);
begin
fmOptions.ShowModal;
end;
{------------------------------------------------------------------------------
Процедура: TdmMain.mbRefreshClick()
Назначение: Обновление списка пакетов и дерева на активной вкладке главного окна

View File

@ -3543,21 +3543,6 @@ object fmMain: TfmMain
OnClick = btnToolsPkgReloadClick
end
end
object btnToolsRun: TButton
Left = 0
Height = 32
Top = 370
Width = 342
Align = alBottom
Caption = 'Запустить'
Font.CharSet = RUSSIAN_CHARSET
Font.Height = -16
Font.Name = 'Microsoft Sans Serif'
Font.Pitch = fpVariable
Font.Quality = fqDraft
ParentFont = False
TabOrder = 2
end
object labToolsPkgDescription: TLabel
Left = 0
Height = 13
@ -3572,11 +3557,10 @@ object fmMain: TfmMain
end
object vstToolsPkgContents: TVirtualStringTree
Left = 0
Height = 305
Height = 340
Top = 62
Width = 342
Align = alClient
BorderSpacing.Bottom = 3
BorderStyle = bsNone
DefaultText = 'Утилита'
DragOperations = []
@ -3585,7 +3569,7 @@ object fmMain: TfmMain
Header.MainColumn = -1
IncrementalSearch = isVisibleOnly
IncrementalSearchStart = ssAlwaysStartOver
TabOrder = 3
TabOrder = 2
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoExpand, toAutoScrollOnExpand, toAutoSort, toAutoTristateTracking, toAutoDeleteMovedNodes, toAutoChangeScale]
OnGetText = vstToolsPkgContentsGetText
end

View File

@ -32,7 +32,6 @@ type
btnSoftStart: TButton;
btnToolsPkgEdit: TSpeedButton;
btnToolsPkgReload: TSpeedButton;
btnToolsRun: TButton;
cmbSoftPkgSelect: TComboBox;
cmbToolsPkgSelect: TComboBox;
edSoftSearch: TEdit;

3690
foptions.lfm Normal file

File diff suppressed because it is too large Load Diff

69
foptions.pas Normal file
View File

@ -0,0 +1,69 @@
unit fOptions;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ButtonPanel,
ComCtrls, ExtCtrls, StdCtrls, Menus;
type
{ TfmOptions }
TfmOptions = class(TForm)
Button1: TButton;
Button2: TButton;
Button3: TButton;
CheckBox1: TCheckBox;
CheckBox10: TCheckBox;
CheckBox11: TCheckBox;
CheckBox2: TCheckBox;
CheckBox3: TCheckBox;
CheckBox4: TCheckBox;
CheckBox5: TCheckBox;
CheckBox6: TCheckBox;
CheckBox7: TCheckBox;
CheckBox8: TCheckBox;
CheckBox9: TCheckBox;
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
imgLogo: TImage;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
mmAbout: TMemo;
PageControl: TPageControl;
tabCommon: TTabSheet;
tabUI: TTabSheet;
tabPackages: TTabSheet;
tabAbout: TTabSheet;
procedure FormCreate(Sender: TObject);
private
public
end;
var
fmOptions: TfmOptions;
implementation
{$R *.lfm}
{ TfmOptions }
procedure TfmOptions.FormCreate(Sender: TObject);
begin
end;
end.