Ignore:
Timestamp:
Mar 9, 2012, 1:09:52 PM (13 years ago)
Author:
chronos
Message:
  • Fixed: Selection of available protocols in profile manager.
  • Modified: Initialization of persistent data structures rewrited to more native structures.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormItemList.pas

    r42 r43  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ComCtrls, ActnList, USystem;
     9  ComCtrls, ActnList, Menus, USystem;
    1010
    1111type
     
    1515  TItemListForm = class(TForm)
    1616    AClose: TAction;
     17    AItemClone: TAction;
    1718    AItemView: TAction;
    1819    AItemEdit: TAction;
     
    2021    AItemDelete: TAction;
    2122    ActionList1: TActionList;
    22     ButtonClose: TButton;
    23     ButtonAdd: TButton;
    24     ButtonDelete: TButton;
    25     ButtonEdit: TButton;
    26     ButtonView: TButton;
    2723    ListView1: TListView;
     24    MenuItem1: TMenuItem;
     25    MenuItem2: TMenuItem;
     26    MenuItem3: TMenuItem;
     27    MenuItem4: TMenuItem;
     28    MenuItem5: TMenuItem;
     29    PopupMenu1: TPopupMenu;
     30    ToolBar1: TToolBar;
     31    ToolButton1: TToolButton;
     32    ToolButton2: TToolButton;
     33    ToolButton3: TToolButton;
     34    ToolButton4: TToolButton;
     35    ToolButton5: TToolButton;
    2836    procedure ACloseExecute(Sender: TObject);
    2937    procedure AItemAddExecute(Sender: TObject);
     
    4654    SelectedItem: Integer;
    4755    procedure Reload;
     56    procedure UpdateInterface;
    4857  end;
    4958
     
    7685  ListView1Resize(Self);
    7786  ListView1SelectItem(Self, nil, False);
     87end;
     88
     89procedure TItemListForm.UpdateInterface;
     90var
     91  I: Integer;
     92begin
     93  AItemDelete.Enabled := Assigned(ListView1.Selected);
     94  AItemView.Enabled := Assigned(ListView1.Selected);
     95  AItemEdit.Enabled := Assigned(ListView1.Selected);
     96  AItemClone.Enabled := Assigned(ListView1.Selected);
     97
     98  for I := 0 to ToolBar1.ButtonCount - 1 do
     99    ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption;
    78100end;
    79101
     
    191213  Selected: Boolean);
    192214begin
    193   ButtonDelete.Enabled := Assigned(ListView1.Selected);
    194   ButtonView.Enabled := Assigned(ListView1.Selected);
    195   ButtonEdit.Enabled := Assigned(ListView1.Selected);
     215  UpdateInterface;
    196216end;
    197217
Note: See TracChangeset for help on using the changeset viewer.