Ignore:
Timestamp:
Jan 19, 2012, 7:34:30 PM (13 years ago)
Author:
chronos
Message:
Location:
ModularSystem/Demo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ModularSystem/Demo

    • Property svn:ignore
      •  

        old new  
        11lib
        22project1.exe
         3project1
  • ModularSystem/Demo/UMainForm.pas

    r314 r316  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    9   StdCtrls, UModularSystem, UModuleUser, UModuleBase;
     9  StdCtrls, Menus, ActnList, UModularSystem, UModuleUser, UModuleBase;
    1010
    1111type
     
    1515  TMainForm = class(TForm)
    1616  published
     17    AModuleInstall: TAction;
     18    AModuleUninstall: TAction;
     19    AModuleUpdate: TAction;
     20    ActionList1: TActionList;
    1721    ButtonUpdate: TButton;
    1822    ButtonUninstall: TButton;
    1923    ButtonInstall: TButton;
    2024    ListViewModules: TListView;
     25    MenuItem1: TMenuItem;
     26    MenuItem2: TMenuItem;
     27    MenuItem3: TMenuItem;
     28    PopupMenu1: TPopupMenu;
    2129    procedure ButtonInstallClick(Sender: TObject);
    2230    procedure ButtonUninstallClick(Sender: TObject);
     
    6472  Installed: Boolean;
    6573begin
    66   if Assigned(Item) then Installed := TModule(Item.Data).Installed;
    67   ButtonInstall.Enabled := Selected and not Installed;
    68   ButtonUninstall.Enabled := Selected and Installed;
    69   ButtonUpdate.Enabled := Selected and Installed;
     74  if Assigned(ListViewModules.Selected) then Installed := TModule(ListViewModules.Selected.Data).Installed;
     75  AModuleInstall.Enabled := Assigned(ListViewModules.Selected) and not Installed;
     76  AModuleUninstall.Enabled := Assigned(ListViewModules.Selected) and Installed;
     77  AModuleUpdate.Enabled := Assigned(ListViewModules.Selected) and Installed;
    7078end;
    7179
Note: See TracChangeset for help on using the changeset viewer.