Меню Список > Обновить

This commit is contained in:
Anthony Axenov 2019-01-20 17:12:43 +08:00
parent 15d4e0bf31
commit c61b66b684
3 changed files with 43 additions and 21 deletions

View File

@ -3628,6 +3628,7 @@ object dmMain: TdmMain
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
} }
ImageIndex = 21 ImageIndex = 21
ShortCut = 24614
OnClick = mbCollapseTreeClick OnClick = mbCollapseTreeClick
end end
object mbExpandTree: TMenuItem object mbExpandTree: TMenuItem
@ -3669,8 +3670,15 @@ object dmMain: TdmMain
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
} }
ImageIndex = 22 ImageIndex = 22
ShortCut = 24616
OnClick = mbExpandTreeClick OnClick = mbExpandTreeClick
end end
object mbRefresh: TMenuItem
Caption = 'Обновить'
ImageIndex = 16
ShortCut = 16466
OnClick = mbRefreshClick
end
end end
object mbCheck: TMenuItem object mbCheck: TMenuItem
Caption = 'Выбор' Caption = 'Выбор'

View File

@ -13,6 +13,7 @@ type
TdmMain = class(TDataModule) TdmMain = class(TDataModule)
imgIcons: TImageList; imgIcons: TImageList;
mbRefresh: TMenuItem;
mmMain: TMainMenu; mmMain: TMainMenu;
mbInstallCheckAll: TMenuItem; mbInstallCheckAll: TMenuItem;
mbInstallExpandTree: TMenuItem; mbInstallExpandTree: TMenuItem;
@ -39,6 +40,7 @@ type
procedure mbCheckNoneClick(Sender: TObject); procedure mbCheckNoneClick(Sender: TObject);
procedure mbCollapseTreeClick(Sender: TObject); procedure mbCollapseTreeClick(Sender: TObject);
procedure mbExpandTreeClick(Sender: TObject); procedure mbExpandTreeClick(Sender: TObject);
procedure mbRefreshClick(Sender: TObject);
private private
// Подготовка директорий // Подготовка директорий
procedure PrepareDirs(); procedure PrepareDirs();
@ -171,6 +173,18 @@ begin
end; end;
end; end;
{------------------------------------------------------------------------------
Процедура: TdmMain.mbRefreshClick()
Назначение: Обновление списка пакетов и дерева на активной вкладке главного окна
------------------------------------------------------------------------------}
procedure TdmMain.mbRefreshClick(Sender: TObject);
begin
case (fmMain.PageControl.ActivePageIndex) of
0: fmMain.btnSoftPkgReload.Click;
1: fmMain.btnToolsPkgReload.Click;
end;
end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Процедура: TdmMain.PreparePackages() Процедура: TdmMain.PreparePackages()
Назначение: Подготовка директорий Назначение: Подготовка директорий

View File

@ -1,7 +1,7 @@
object fmMain: TfmMain object fmMain: TfmMain
Left = 430 Left = 301
Height = 450 Height = 450
Top = 108 Top = 85
Width = 350 Width = 350
BorderIcons = [biSystemMenu, biMinimize] BorderIcons = [biSystemMenu, biMinimize]
Caption = 'ABTool' Caption = 'ABTool'
@ -3222,10 +3222,10 @@ object fmMain: TfmMain
Width = 350 Width = 350
ActivePage = tabSoft ActivePage = tabSoft
Align = alClient Align = alClient
Images = dmMain.imgIcons
TabHeight = 20 TabHeight = 20
TabIndex = 0 TabIndex = 0
TabOrder = 0 TabOrder = 0
TabWidth = 86
OnChange = PageControlChange OnChange = PageControlChange
object tabSoft: TTabSheet object tabSoft: TTabSheet
Caption = 'Установка' Caption = 'Установка'
@ -3234,8 +3234,8 @@ object fmMain: TfmMain
ImageIndex = 104 ImageIndex = 104
object vstSoftPkgContents: TVirtualStringTree object vstSoftPkgContents: TVirtualStringTree
Left = 0 Left = 0
Height = 297 Height = 299
Top = 64 Top = 62
Width = 342 Width = 342
Align = alClient Align = alClient
BorderSpacing.Bottom = 3 BorderSpacing.Bottom = 3
@ -3255,18 +3255,18 @@ object fmMain: TfmMain
end end
object pnSoftTop: TPanel object pnSoftTop: TPanel
Left = 0 Left = 0
Height = 25 Height = 23
Top = 0 Top = 0
Width = 342 Width = 342
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 25 ClientHeight = 23
ClientWidth = 342 ClientWidth = 342
TabOrder = 1 TabOrder = 1
object cmbSoftPkgSelect: TComboBox object cmbSoftPkgSelect: TComboBox
Left = 0 Left = 0
Height = 23 Height = 21
Top = 2 Top = 2
Width = 289 Width = 289
Align = alClient Align = alClient
@ -3280,7 +3280,7 @@ object fmMain: TfmMain
end end
object btnSoftPkgEdit: TSpeedButton object btnSoftPkgEdit: TSpeedButton
Left = 316 Left = 316
Height = 25 Height = 23
Hint = 'Редактировать пакет' Hint = 'Редактировать пакет'
Top = 0 Top = 0
Width = 26 Width = 26
@ -3326,7 +3326,7 @@ object fmMain: TfmMain
end end
object btnSoftPkgReload: TSpeedButton object btnSoftPkgReload: TSpeedButton
Left = 290 Left = 290
Height = 25 Height = 23
Hint = 'Перезагрузить пакет' Hint = 'Перезагрузить пакет'
Top = 0 Top = 0
Width = 26 Width = 26
@ -3373,7 +3373,7 @@ object fmMain: TfmMain
object labSoftPkgDescription: TLabel object labSoftPkgDescription: TLabel
Left = 0 Left = 0
Height = 13 Height = 13
Top = 48 Top = 46
Width = 342 Width = 342
Align = alTop Align = alTop
BorderSpacing.Bottom = 3 BorderSpacing.Bottom = 3
@ -3384,7 +3384,7 @@ object fmMain: TfmMain
object edSoftSearch: TEdit object edSoftSearch: TEdit
Left = 0 Left = 0
Height = 13 Height = 13
Top = 30 Top = 28
Width = 342 Width = 342
Align = alTop Align = alTop
BorderSpacing.Top = 5 BorderSpacing.Top = 5
@ -3417,7 +3417,7 @@ object fmMain: TfmMain
object edToolsSearch: TEdit object edToolsSearch: TEdit
Left = 0 Left = 0
Height = 13 Height = 13
Top = 30 Top = 28
Width = 342 Width = 342
Align = alTop Align = alTop
BorderSpacing.Top = 5 BorderSpacing.Top = 5
@ -3428,18 +3428,18 @@ object fmMain: TfmMain
end end
object pnToolsTop: TPanel object pnToolsTop: TPanel
Left = 0 Left = 0
Height = 25 Height = 23
Top = 0 Top = 0
Width = 342 Width = 342
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 25 ClientHeight = 23
ClientWidth = 342 ClientWidth = 342
TabOrder = 1 TabOrder = 1
object cmbToolsPkgSelect: TComboBox object cmbToolsPkgSelect: TComboBox
Left = 0 Left = 0
Height = 23 Height = 21
Top = 2 Top = 2
Width = 289 Width = 289
Align = alClient Align = alClient
@ -3453,7 +3453,7 @@ object fmMain: TfmMain
end end
object btnToolsPkgEdit: TSpeedButton object btnToolsPkgEdit: TSpeedButton
Left = 316 Left = 316
Height = 25 Height = 23
Hint = 'Редактировать пакет' Hint = 'Редактировать пакет'
Top = 0 Top = 0
Width = 26 Width = 26
@ -3499,7 +3499,7 @@ object fmMain: TfmMain
end end
object btnToolsPkgReload: TSpeedButton object btnToolsPkgReload: TSpeedButton
Left = 290 Left = 290
Height = 25 Height = 23
Hint = 'Перезагрузить пакет' Hint = 'Перезагрузить пакет'
Top = 0 Top = 0
Width = 26 Width = 26
@ -3561,7 +3561,7 @@ object fmMain: TfmMain
object labToolsPkgDescription: TLabel object labToolsPkgDescription: TLabel
Left = 0 Left = 0
Height = 13 Height = 13
Top = 48 Top = 46
Width = 342 Width = 342
Align = alTop Align = alTop
AutoSize = False AutoSize = False
@ -3572,8 +3572,8 @@ object fmMain: TfmMain
end end
object vstToolsPkgContents: TVirtualStringTree object vstToolsPkgContents: TVirtualStringTree
Left = 0 Left = 0
Height = 303 Height = 305
Top = 64 Top = 62
Width = 342 Width = 342
Align = alClient Align = alClient
BorderSpacing.Bottom = 3 BorderSpacing.Bottom = 3