Changeset 52 for trunk/Client/USystem.pas
- Timestamp:
- Apr 3, 2012, 7:28:01 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Client/USystem.pas
r51 r52 7 7 uses 8 8 Classes, SysUtils, SpecializedList, SpecializedDictionary, USqlDatabase, 9 Strings, UDataTypes, Dialogs, ComCtrls, StdCtrls, Controls, U ChronisClient,9 Strings, UDataTypes, Dialogs, ComCtrls, StdCtrls, Controls, UPDClient, 10 10 UChronisModule; 11 11 … … 93 93 Base: TChronisBase; 94 94 procedure UpdateList; 95 function IsInstalled: Boolean; 95 96 procedure Install; 96 97 procedure Uninstall; … … 104 105 procedure SetActive(AValue: Boolean); 105 106 public 106 Types: T ChronisTypeList;107 Client: T ChronisClient;107 Types: TPDTypeList; 108 Client: TPDClient; 108 109 Modules: TChronisModuleList; 109 110 ModuleSystem: TChronisModule; … … 635 636 Types.Clear; 636 637 for I := 0 to Proxy.Objects.Count - 1 do begin 637 with T ChronisType(Types.AddNew(TChronisType.Create)) do638 with TPDType(Types.AddNew(TPDType.Create)) do 638 639 with TObjectProxy(Proxy.Objects[I]) do begin 639 640 Id := StrToInt(Properties.Values['Id']); … … 667 668 constructor TChronisBase.Create; 668 669 begin 669 Types := T ChronisTypeList.Create;670 Types := TPDTypeList.Create; 670 671 Modules := TChronisModuleList.Create; 671 672 Modules.Base := Self; … … 781 782 end; 782 783 784 function TChronisModuleList.IsInstalled: Boolean; 785 var 786 NewType: TPDType; 787 begin 788 with TPDType.Create do 789 try 790 Client := Base.Client; 791 Name := SystemModuleObject; 792 Result := IsDefined; 793 finally 794 Free; 795 end; 796 end; 797 783 798 procedure TChronisModuleList.Install; 784 799 var 785 NewType: TChronisType; 786 begin 787 NewType := TChronisType.Create; 788 NewType.Client := Base.Client; 789 NewType.Name := SystemModuleObject; 790 NewType.Properties.Add('SysName', 'String'); 791 NewType.Properties.Add('Name', 'String'); 792 NewType.Properties.Add('Version', 'String'); 793 NewType.Properties.Add('License', 'String'); 794 NewType.Properties.Add('Creator', 'String'); 795 NewType.Properties.Add('HomePage', 'String'); 796 NewType.Properties.Add('Installed', 'Boolean'); 797 NewType.Define; 800 NewType: TPDType; 801 begin 802 with TPDType.Create do 803 try 804 Client := Base.Client; 805 Name := SystemModuleObject; 806 with Properties do begin 807 Add('SysName', 'String'); 808 Add('Name', 'String'); 809 Add('Version', 'String'); 810 Add('License', 'String'); 811 Add('Creator', 'String'); 812 Add('HomePage', 'String'); 813 Add('Installed', 'Boolean'); 814 end; 815 Define; 816 finally 817 Free; 818 end; 798 819 end; 799 820 800 821 procedure TChronisModuleList.Uninstall; 801 822 var 802 NewType: TChronisType; 803 begin 804 NewType := TChronisType.Create; 805 NewType.Client := Base.Client; 806 NewType.Name := SystemModuleObject; 807 NewType.Undefine; 823 NewType: TPDType; 824 begin 825 with TPDType.Create do 826 try 827 Client := Base.Client; 828 Name := SystemModuleObject; 829 Undefine; 830 finally 831 Free; 832 end; 808 833 end; 809 834
Note:
See TracChangeset
for help on using the changeset viewer.