Changeset 316 for ModularSystem/Demo/UMainForm.pas
- Timestamp:
- Jan 19, 2012, 7:34:30 PM (13 years ago)
- Location:
- ModularSystem/Demo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ModularSystem/Demo
- Property svn:ignore
-
old new 1 1 lib 2 2 project1.exe 3 project1
-
- Property svn:ignore
-
ModularSystem/Demo/UMainForm.pas
r314 r316 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 9 StdCtrls, UModularSystem, UModuleUser, UModuleBase;9 StdCtrls, Menus, ActnList, UModularSystem, UModuleUser, UModuleBase; 10 10 11 11 type … … 15 15 TMainForm = class(TForm) 16 16 published 17 AModuleInstall: TAction; 18 AModuleUninstall: TAction; 19 AModuleUpdate: TAction; 20 ActionList1: TActionList; 17 21 ButtonUpdate: TButton; 18 22 ButtonUninstall: TButton; 19 23 ButtonInstall: TButton; 20 24 ListViewModules: TListView; 25 MenuItem1: TMenuItem; 26 MenuItem2: TMenuItem; 27 MenuItem3: TMenuItem; 28 PopupMenu1: TPopupMenu; 21 29 procedure ButtonInstallClick(Sender: TObject); 22 30 procedure ButtonUninstallClick(Sender: TObject); … … 64 72 Installed: Boolean; 65 73 begin 66 if Assigned( Item) then Installed := TModule(Item.Data).Installed;67 ButtonInstall.Enabled := Selectedand not Installed;68 ButtonUninstall.Enabled := Selectedand Installed;69 ButtonUpdate.Enabled := Selectedand 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; 70 78 end; 71 79
Note:
See TracChangeset
for help on using the changeset viewer.