Changeset 59
- Timestamp:
- Nov 16, 2012, 9:59:56 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 1 deleted
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChronISPlatform.lpk
r58 r59 66 66 <Item1> 67 67 <PackageName Value="CoolWeb"/> 68 <DefaultFilename Value="Packages\CoolWeb\CoolWeb.lpk" Prefer="True"/>69 68 </Item1> 70 69 <Item2> -
trunk/Demo
- Property svn:ignore
-
old new 1 1 heaptrclog.trc 2 2 lib 3 ChronisDemo.exe 4 *.dbg
-
- Property svn:ignore
-
trunk/Demo/ChronisDemo.lpi
r58 r59 73 73 </local> 74 74 </RunParams> 75 <RequiredPackages Count=" 2">75 <RequiredPackages Count="4"> 76 76 <Item1> 77 <PackageName Value=" ModularSystem"/>77 <PackageName Value="Common"/> 78 78 </Item1> 79 79 <Item2> 80 <PackageName Value="ChronISPlatform"/> 81 <DefaultFilename Value="../ChronISPlatform.lpk" Prefer="True"/> 82 </Item2> 83 <Item3> 84 <PackageName Value="ModularSystem"/> 85 </Item3> 86 <Item4> 80 87 <PackageName Value="LCL"/> 81 </Item 2>88 </Item4> 82 89 </RequiredPackages> 83 90 <Units Count="4"> … … 90 97 <Filename Value="UDataModuleDemo.pas"/> 91 98 <IsPartOfProject Value="True"/> 92 <ComponentName Value="DataModule Test"/>99 <ComponentName Value="DataModuleDemo"/> 93 100 <HasResources Value="True"/> 94 101 <ResourceBaseClass Value="DataModule"/> … … 96 103 </Unit1> 97 104 <Unit2> 105 <Filename Value="URegistredModules.pas"/> 106 <IsPartOfProject Value="True"/> 107 <UnitName Value="URegistredModules"/> 108 </Unit2> 109 <Unit3> 98 110 <Filename Value="Modules/Test/UModuleTest.pas"/> 99 111 <IsPartOfProject Value="True"/> … … 102 114 <ResourceBaseClass Value="DataModule"/> 103 115 <UnitName Value="UModuleTest"/> 104 </Unit2>105 <Unit3>106 <Filename Value="URegistredModules.pas"/>107 <IsPartOfProject Value="True"/>108 <UnitName Value="URegistredModules"/>109 116 </Unit3> 110 117 </Units> -
trunk/Demo/ChronisDemo.lpr
r58 r59 8 8 {$ENDIF}{$ENDIF} 9 9 Interfaces, // this includes the LCL widgetset 10 Forms, SysUtils, UDataModuleDemo, URegistredModules, UModuleTest;10 Forms, SysUtils, UDataModuleDemo, Common, UModuleTest; 11 11 12 12 {$R *.res} … … 26 26 RequireDerivedFormResource := True; 27 27 Application.Initialize; 28 Application.CreateForm(TDataModule Test, DataModuleTest);28 Application.CreateForm(TDataModuleDemo, DataModuleDemo); 29 29 Application.Run; 30 30 end. -
trunk/Demo/ChronisDemo.lps
r58 r59 5 5 <Version Value="9"/> 6 6 <BuildModes Active="Debug"/> 7 <Units Count=" 58">7 <Units Count="62"> 8 8 <Unit0> 9 9 <Filename Value="ChronisDemo.lpr"/> … … 13 13 <WindowIndex Value="0"/> 14 14 <TopLine Value="7"/> 15 <CursorPos X=" 39" Y="27"/>16 <UsageCount Value="5 2"/>15 <CursorPos X="41" Y="14"/> 16 <UsageCount Value="54"/> 17 17 <Loaded Value="True"/> 18 18 <DefaultSyntaxHighlighter Value="Delphi"/> … … 21 21 <Filename Value="UDataModuleDemo.pas"/> 22 22 <IsPartOfProject Value="True"/> 23 <ComponentName Value="DataModule Test"/>23 <ComponentName Value="DataModuleDemo"/> 24 24 <HasResources Value="True"/> 25 25 <ResourceBaseClass Value="DataModule"/> … … 27 27 <EditorIndex Value="3"/> 28 28 <WindowIndex Value="0"/> 29 <TopLine Value=" 25"/>30 <CursorPos X="5 " Y="45"/>31 <UsageCount Value="2 1"/>29 <TopLine Value="39"/> 30 <CursorPos X="56" Y="46"/> 31 <UsageCount Value="23"/> 32 32 <Loaded Value="True"/> 33 33 <LoadedDesigner Value="True"/> … … 35 35 </Unit1> 36 36 <Unit2> 37 <Filename Value="URegistredModules.pas"/> 38 <IsPartOfProject Value="True"/> 39 <UnitName Value="URegistredModules"/> 40 <EditorIndex Value="1"/> 41 <WindowIndex Value="0"/> 42 <TopLine Value="19"/> 43 <CursorPos X="3" Y="21"/> 44 <UsageCount Value="22"/> 45 <Loaded Value="True"/> 46 <DefaultSyntaxHighlighter Value="Delphi"/> 47 </Unit2> 48 <Unit3> 37 49 <Filename Value="Modules\Test\UModuleTest.pas"/> 38 50 <IsPartOfProject Value="True"/> … … 41 53 <ResourceBaseClass Value="DataModule"/> 42 54 <UnitName Value="UModuleTest"/> 43 <EditorIndex Value="2"/> 44 <WindowIndex Value="0"/> 45 <TopLine Value="1"/> 46 <CursorPos X="30" Y="8"/> 47 <UsageCount Value="20"/> 48 <Loaded Value="True"/> 49 <DefaultSyntaxHighlighter Value="Delphi"/> 50 </Unit2> 51 <Unit3> 52 <Filename Value="URegistredModules.pas"/> 53 <IsPartOfProject Value="True"/> 54 <UnitName Value="URegistredModules"/> 55 <IsVisibleTab Value="True"/> 56 <EditorIndex Value="1"/> 57 <WindowIndex Value="0"/> 58 <TopLine Value="1"/> 59 <CursorPos X="1" Y="19"/> 60 <UsageCount Value="20"/> 61 <Loaded Value="True"/> 55 <EditorIndex Value="4"/> 56 <WindowIndex Value="0"/> 57 <TopLine Value="41"/> 58 <CursorPos X="1" Y="62"/> 59 <UsageCount Value="22"/> 60 <Loaded Value="True"/> 61 <LoadedDesigner Value="True"/> 62 62 <DefaultSyntaxHighlighter Value="Delphi"/> 63 63 </Unit3> … … 382 382 <Filename Value="H:\Projekty\LiftBox\Repository\trunk\Packages\ModularSystem\UModularSystem.pas"/> 383 383 <UnitName Value="UModularSystem"/> 384 <EditorIndex Value=" 6"/>384 <EditorIndex Value="10"/> 385 385 <WindowIndex Value="0"/> 386 386 <TopLine Value="199"/> … … 401 401 <Filename Value="H:\Lazarus\1.1_2.6.0\lcl\forms.pp"/> 402 402 <UnitName Value="Forms"/> 403 <EditorIndex Value=" 7"/>403 <EditorIndex Value="11"/> 404 404 <WindowIndex Value="0"/> 405 405 <TopLine Value="1355"/> … … 518 518 <ResourceBaseClass Value="DataModule"/> 519 519 <UnitName Value="UCore"/> 520 <EditorIndex Value="5"/> 521 <WindowIndex Value="0"/> 522 <TopLine Value="95"/> 523 <CursorPos X="76" Y="41"/> 520 <IsVisibleTab Value="True"/> 521 <EditorIndex Value="6"/> 522 <WindowIndex Value="0"/> 523 <TopLine Value="194"/> 524 <CursorPos X="35" Y="209"/> 524 525 <UsageCount Value="10"/> 525 526 <Loaded Value="True"/> … … 532 533 <ResourceBaseClass Value="Form"/> 533 534 <UnitName Value="UFormConnection"/> 534 <EditorIndex Value=" 9"/>535 <EditorIndex Value="13"/> 535 536 <WindowIndex Value="0"/> 536 537 <TopLine Value="1"/> … … 542 543 <Unit56> 543 544 <Filename Value="H:\Lazarus\1.1_2.6.0\lcl\include\application.inc"/> 544 <EditorIndex Value=" 8"/>545 <EditorIndex Value="12"/> 545 546 <WindowIndex Value="0"/> 546 547 <TopLine Value="2148"/> … … 552 553 <Filename Value="..\Forms\UFormMain.pas"/> 553 554 <UnitName Value="UFormMain"/> 554 <EditorIndex Value=" 4"/>555 <WindowIndex Value="0"/> 556 <TopLine Value="8 3"/>557 <CursorPos X=" 9" Y="96"/>555 <EditorIndex Value="5"/> 556 <WindowIndex Value="0"/> 557 <TopLine Value="82"/> 558 <CursorPos X="20" Y="94"/> 558 559 <UsageCount Value="10"/> 559 560 <Loaded Value="True"/> 560 561 </Unit57> 562 <Unit58> 563 <Filename Value="..\Packages\TemplateGenerics\Generic\GenericList.inc"/> 564 <EditorIndex Value="2"/> 565 <WindowIndex Value="0"/> 566 <TopLine Value="562"/> 567 <CursorPos X="3" Y="566"/> 568 <UsageCount Value="10"/> 569 <Loaded Value="True"/> 570 </Unit58> 571 <Unit59> 572 <Filename Value="..\Packages\Common\URegistry.pas"/> 573 <UnitName Value="URegistry"/> 574 <EditorIndex Value="8"/> 575 <WindowIndex Value="0"/> 576 <TopLine Value="112"/> 577 <CursorPos X="1" Y="120"/> 578 <UsageCount Value="10"/> 579 <Loaded Value="True"/> 580 </Unit59> 581 <Unit60> 582 <Filename Value="..\Packages\CoolWeb\Persistence\USqlDatabase.pas"/> 583 <UnitName Value="USqlDatabase"/> 584 <EditorIndex Value="7"/> 585 <WindowIndex Value="0"/> 586 <TopLine Value="230"/> 587 <CursorPos X="1" Y="241"/> 588 <UsageCount Value="10"/> 589 <Loaded Value="True"/> 590 <DefaultSyntaxHighlighter Value="Delphi"/> 591 </Unit60> 592 <Unit61> 593 <Filename Value="..\Packages\ModularSystem\UModularSystem.pas"/> 594 <UnitName Value="UModularSystem"/> 595 <EditorIndex Value="9"/> 596 <WindowIndex Value="0"/> 597 <TopLine Value="97"/> 598 <CursorPos X="1" Y="111"/> 599 <UsageCount Value="10"/> 600 <Loaded Value="True"/> 601 </Unit61> 561 602 </Units> 562 603 <General> … … 565 606 <JumpHistory Count="30" HistoryIndex="29"> 566 607 <Position1> 567 <Filename Value=" UDataModuleDemo.pas"/>568 <Caret Line="3 6" Column="22" TopLine="19"/>608 <Filename Value="..\UCore.pas"/> 609 <Caret Line="38" Column="18" TopLine="22"/> 569 610 </Position1> 570 611 <Position2> 571 612 <Filename Value="..\UCore.pas"/> 572 <Caret Line=" 78" Column="1" TopLine="73"/>613 <Caret Line="184" Column="1" TopLine="179"/> 573 614 </Position2> 574 615 <Position3> 575 <Filename Value="..\ UCore.pas"/>576 <Caret Line=" 79" Column="1" TopLine="73"/>616 <Filename Value="..\Packages\Common\URegistry.pas"/> 617 <Caret Line="51" Column="1" TopLine="39"/> 577 618 </Position3> 578 619 <Position4> 579 <Filename Value="..\ Forms\UFormMain.pas"/>580 <Caret Line=" 187" Column="1" TopLine="175"/>620 <Filename Value="..\Packages\Common\URegistry.pas"/> 621 <Caret Line="52" Column="1" TopLine="39"/> 581 622 </Position4> 582 623 <Position5> 583 <Filename Value="..\ UCore.pas"/>584 <Caret Line=" 110" Column="1" TopLine="98"/>624 <Filename Value="..\Packages\Common\URegistry.pas"/> 625 <Caret Line="53" Column="1" TopLine="39"/> 585 626 </Position5> 586 627 <Position6> 587 <Filename Value=" H:\Projekty\LiftBox\Repository\trunk\Packages\ModularSystem\UModularSystem.pas"/>588 <Caret Line=" 204" Column="1" TopLine="199"/>628 <Filename Value="..\Packages\Common\URegistry.pas"/> 629 <Caret Line="54" Column="1" TopLine="39"/> 589 630 </Position6> 590 631 <Position7> 591 632 <Filename Value="..\UCore.pas"/> 592 <Caret Line="1 37" Column="1" TopLine="126"/>633 <Caret Line="185" Column="1" TopLine="179"/> 593 634 </Position7> 594 635 <Position8> 595 <Filename Value="..\ Forms\UFormMain.pas"/>596 <Caret Line=" 96" Column="9" TopLine="83"/>636 <Filename Value="..\UCore.pas"/> 637 <Caret Line="186" Column="1" TopLine="179"/> 597 638 </Position8> 598 639 <Position9> 599 640 <Filename Value="..\UCore.pas"/> 600 <Caret Line=" 78" Column="37" TopLine="66"/>641 <Caret Line="184" Column="1" TopLine="179"/> 601 642 </Position9> 602 643 <Position10> 603 <Filename Value="..\ UCore.pas"/>604 <Caret Line=" 83" Column="5" TopLine="66"/>644 <Filename Value="..\Packages\Common\URegistry.pas"/> 645 <Caret Line="51" Column="1" TopLine="39"/> 605 646 </Position10> 606 647 <Position11> 607 <Filename Value=" H:\Lazarus\1.1_2.6.0\lcl\include\application.inc"/>608 <Caret Line=" 2156" Column="3" TopLine="2148"/>648 <Filename Value="..\Packages\Common\URegistry.pas"/> 649 <Caret Line="52" Column="1" TopLine="39"/> 609 650 </Position11> 610 651 <Position12> 611 <Filename Value="..\ UCore.pas"/>612 <Caret Line=" 78" Column="1" TopLine="66"/>652 <Filename Value="..\Packages\Common\URegistry.pas"/> 653 <Caret Line="53" Column="1" TopLine="39"/> 613 654 </Position12> 614 655 <Position13> 615 <Filename Value="..\ UCore.pas"/>616 <Caret Line=" 79" Column="1" TopLine="66"/>656 <Filename Value="..\Packages\Common\URegistry.pas"/> 657 <Caret Line="54" Column="1" TopLine="39"/> 617 658 </Position13> 618 659 <Position14> 619 <Filename Value="..\ UCore.pas"/>620 <Caret Line=" 80" Column="1" TopLine="66"/>660 <Filename Value="..\Packages\ModularSystem\UModularSystem.pas"/> 661 <Caret Line="314" Column="1" TopLine="302"/> 621 662 </Position14> 622 663 <Position15> 623 <Filename Value="..\ UCore.pas"/>624 <Caret Line=" 78" Column="15" TopLine="66"/>664 <Filename Value="..\Packages\ModularSystem\UModularSystem.pas"/> 665 <Caret Line="315" Column="1" TopLine="302"/> 625 666 </Position15> 626 667 <Position16> 627 <Filename Value=" UDataModuleDemo.pas"/>628 <Caret Line=" 46" Column="1" TopLine="24"/>668 <Filename Value="..\Packages\ModularSystem\UModularSystem.pas"/> 669 <Caret Line="316" Column="1" TopLine="302"/> 629 670 </Position16> 630 671 <Position17> 631 <Filename Value=" UDataModuleDemo.pas"/>632 <Caret Line="32 " Column="18" TopLine="25"/>672 <Filename Value="..\Packages\ModularSystem\UModularSystem.pas"/> 673 <Caret Line="320" Column="25" TopLine="302"/> 633 674 </Position17> 634 675 <Position18> 635 <Filename Value=" ChronisDemo.lpr"/>636 <Caret Line=" 27" Column="1" TopLine="7"/>676 <Filename Value="..\Packages\ModularSystem\UModularSystem.pas"/> 677 <Caret Line="318" Column="1" TopLine="302"/> 637 678 </Position18> 638 679 <Position19> 639 <Filename Value=" ChronisDemo.lpr"/>640 <Caret Line=" 28" Column="57" TopLine="7"/>680 <Filename Value="..\Packages\ModularSystem\UModularSystem.pas"/> 681 <Caret Line="319" Column="1" TopLine="302"/> 641 682 </Position19> 642 683 <Position20> 643 <Filename Value=" ChronisDemo.lpr"/>644 <Caret Line=" 16" Column="59" TopLine="7"/>684 <Filename Value="..\Packages\ModularSystem\UModularSystem.pas"/> 685 <Caret Line="320" Column="1" TopLine="302"/> 645 686 </Position20> 646 687 <Position21> 647 <Filename Value=" ChronisDemo.lpr"/>648 <Caret Line=" 21" Column="52" TopLine="7"/>688 <Filename Value="..\Packages\Common\URegistry.pas"/> 689 <Caret Line="124" Column="1" TopLine="112"/> 649 690 </Position21> 650 691 <Position22> 651 <Filename Value=" ChronisDemo.lpr"/>652 <Caret Line=" 30" Column="1" TopLine="7"/>692 <Filename Value="..\Packages\Common\URegistry.pas"/> 693 <Caret Line="125" Column="1" TopLine="112"/> 653 694 </Position22> 654 695 <Position23> 655 <Filename Value=" ChronisDemo.lpr"/>656 <Caret Line=" 22" Column="46" TopLine="7"/>696 <Filename Value="..\Packages\Common\URegistry.pas"/> 697 <Caret Line="126" Column="1" TopLine="112"/> 657 698 </Position23> 658 699 <Position24> 659 <Filename Value=" UDataModuleDemo.pas"/>660 <Caret Line=" 38" Column="38" TopLine="25"/>700 <Filename Value="..\Packages\Common\URegistry.pas"/> 701 <Caret Line="119" Column="1" TopLine="112"/> 661 702 </Position24> 662 703 <Position25> 663 <Filename Value=" UDataModuleDemo.pas"/>664 <Caret Line=" 8" Column="39" TopLine="1"/>704 <Filename Value="..\Packages\Common\URegistry.pas"/> 705 <Caret Line="120" Column="1" TopLine="112"/> 665 706 </Position25> 666 707 <Position26> 667 <Filename Value=" UDataModuleDemo.pas"/>668 <Caret Line=" 11" Column="44" TopLine="1"/>708 <Filename Value="..\Packages\ModularSystem\UModularSystem.pas"/> 709 <Caret Line="311" Column="42" TopLine="302"/> 669 710 </Position26> 670 711 <Position27> 671 <Filename Value=" UDataModuleDemo.pas"/>672 <Caret Line=" 8" Column="37" TopLine="1"/>712 <Filename Value="..\Packages\ModularSystem\UModularSystem.pas"/> 713 <Caret Line="293" Column="44" TopLine="292"/> 673 714 </Position27> 674 715 <Position28> 675 <Filename Value=" URegistredModules.pas"/>676 <Caret Line=" 25" Column="5" TopLine="10"/>716 <Filename Value="..\Packages\ModularSystem\UModularSystem.pas"/> 717 <Caret Line="137" Column="18" TopLine="122"/> 677 718 </Position28> 678 719 <Position29> 679 <Filename Value=" URegistredModules.pas"/>680 <Caret Line=" 8" Column="24" TopLine="1"/>720 <Filename Value="..\Packages\ModularSystem\UModularSystem.pas"/> 721 <Caret Line="111" Column="1" TopLine="97"/> 681 722 </Position29> 682 723 <Position30> 683 <Filename Value=" Modules\Test\UModuleTest.pas"/>684 <Caret Line=" 18" Column="35" TopLine="1"/>724 <Filename Value="..\UCore.pas"/> 725 <Caret Line="200" Column="58" TopLine="179"/> 685 726 </Position30> 686 727 </JumpHistory> -
trunk/Demo/Modules/Test/UModuleTest.lfm
r58 r59 2 2 OldCreateOrder = False 3 3 Height = 150 4 HorizontalOffset = 3 915 VerticalOffset = 2174 HorizontalOffset = 329 5 VerticalOffset = 80 6 6 Width = 150 7 7 end -
trunk/Demo/Modules/Test/UModuleTest.pas
r58 r59 15 15 { public declarations } 16 16 end; 17 17 18 18 19 { TModuleTest } … … 37 38 resourcestring 38 39 STest = 'Test'; 39 STestDescription = 'Test of various platform features during development';40 STestDescription = 'Test module for testing supported features'; 40 41 41 42 { TModuleTest } -
trunk/Demo/UDataModuleDemo.lfm
r58 r59 1 object DataModule Test: TDataModuleTest1 object DataModuleDemo: TDataModuleDemo 2 2 OnCreate = DataModuleCreate 3 3 OnDestroy = DataModuleDestroy 4 4 OldCreateOrder = False 5 Height = 150 6 HorizontalOffset = 614 7 VerticalOffset = 181 8 Width = 150 5 Height = 279 6 HorizontalOffset = 366 7 VerticalOffset = 165 8 Width = 360 9 object ChronisPlatform1: TChronisPlatform 10 OnRegisterModules = ChronisPlatform1RegisterModules 11 OnUnregisterModules = ChronisPlatform1UnregisterModules 12 left = 65 13 top = 58 14 end 15 object ApplicationInfo1: TApplicationInfo 16 Identification = 1 17 VersionMajor = 1 18 VersionMinor = 0 19 VersionBugFix = 0 20 VersionSuffix = 'alfa' 21 CompanyName = 'Chronosoft' 22 AuthorsName = 'Chronos' 23 EmailContact = 'robie@centrum.cz' 24 AppName = 'ChronisDemo' 25 ReleaseDate = 41229 26 RegistryKey = '\Software\Chronosoft\ChronisDemo' 27 RegistryRoot = rrKeyCurrentUser 28 left = 65 29 top = 120 30 end 9 31 end -
trunk/Demo/UDataModuleDemo.pas
r58 r59 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, Forms; 8 Classes, SysUtils, FileUtil, Forms, UCore, UApplicationInfo, URegistry, 9 Registry; 9 10 10 11 type 11 12 12 { TDataModule Test}13 { TDataModuleDemo } 13 14 14 TDataModuleTest = class(TDataModule) 15 TDataModuleDemo = class(TDataModule) 16 ApplicationInfo1: TApplicationInfo; 17 ChronisPlatform1: TChronisPlatform; 18 procedure ChronisPlatform1RegisterModules(Sender: TObject); 19 procedure ChronisPlatform1UnregisterModules(Sender: TObject); 15 20 procedure DataModuleCreate(Sender: TObject); 16 21 procedure DataModuleDestroy(Sender: TObject); … … 22 27 23 28 var 24 DataModule Test: TDataModuleTest;29 DataModuleDemo: TDataModuleDemo; 25 30 26 31 implementation … … 28 33 {$R *.lfm} 29 34 30 //uses31 //URegistredModules;35 uses 36 URegistredModules; 32 37 33 38 34 { TDataModule Test}39 { TDataModuleDemo } 35 40 36 procedure TDataModule Test.DataModuleCreate(Sender: TObject);41 procedure TDataModuleDemo.DataModuleCreate(Sender: TObject); 37 42 begin 38 //ChronisPlatform1.Init;39 //RegisterModules(Core.ModuleManager);43 ChronisPlatform1.RegistryContext := RegContext(HKEY(ApplicationInfo1.RegistryRoot), ApplicationInfo1.RegistryKey); 44 ChronisPlatform1.Init; 40 45 end; 41 46 42 procedure TDataModule Test.DataModuleDestroy(Sender: TObject);47 procedure TDataModuleDemo.ChronisPlatform1RegisterModules(Sender: TObject); 43 48 begin 44 //UnregisterModules(Core.ModuleManager); 45 //ChronisPlatform1.Done; 49 RegisterModules(Core.ModuleManager); 50 end; 51 52 procedure TDataModuleDemo.ChronisPlatform1UnregisterModules(Sender: TObject); 53 begin 54 UnregisterModules(Core.ModuleManager); 55 end; 56 57 procedure TDataModuleDemo.DataModuleDestroy(Sender: TObject); 58 begin 59 ChronisPlatform1.Done; 46 60 end; 47 61 -
trunk/Demo/URegistredModules.pas
r58 r59 14 14 implementation 15 15 16 //uses17 //UModuleTest;16 uses 17 UModuleTest; 18 18 19 19 procedure RegisterModules(ModuleManager: TModuleManager); … … 23 23 try 24 24 Modules.BeginUpdate; 25 //RegisterModule(TModuleTest.Create(nil));25 RegisterModule(TModuleTest.Create(nil)); 26 26 finally 27 27 Modules.EndUpdate; -
trunk/Packages/Common/URegistry.pas
r56 r59 17 17 rrKeyDynData = HKEY($80000006)); 18 18 19 { TRegistryContext } 20 19 21 TRegistryContext = record 20 22 RootKey: HKEY; 21 23 Key: string; 24 class operator Equal(A: TRegistryContext; B: TRegistryContext): Boolean; 22 25 end; 23 26 … … 49 52 Result.RootKey := RootKey; 50 53 Result.Key := Key; 54 end; 55 56 { TRegistryContext } 57 58 class operator TRegistryContext.Equal(A: TRegistryContext; B: TRegistryContext 59 ): Boolean; 60 begin 61 Result := (A.RootKey = B.RootKey) and (A.Key = B.Key); 51 62 end; 52 63 -
trunk/Packages/ModularSystem/Language/UModularSystem.cs.po
r56 r59 10 10 "Content-Transfer-Encoding: 8bit\n" 11 11 12 #: umodularsystem.sinvalidmodulename 13 msgid "Invalid module name" 14 msgstr "" 15 12 16 #: umodularsystem.smodulenotfound 13 17 msgid "Module \"%1:s\" not found as dependency for module \"%0:s\"" -
trunk/Packages/ModularSystem/Language/UModularSystem.po
r56 r59 1 1 msgid "" 2 2 msgstr "Content-Type: text/plain; charset=UTF-8" 3 4 #: umodularsystem.sinvalidmodulename 5 msgid "Invalid module name" 6 msgstr "" 3 7 4 8 #: umodularsystem.smodulenotfound -
trunk/Packages/ModularSystem/UModularSystem.pas
r56 r59 109 109 FAPI: TAPI; 110 110 FOnUpdate: TNotifyEvent; 111 FUpdateCount: Integer;112 111 FOptions: TModuleManagerOptions; 113 112 procedure SetAPI(AValue: TAPI); … … 122 121 procedure RegisterModule(Module: TModule); 123 122 procedure UnregisterModule(Module: TModule); 124 procedure LoadFromRegistry( Context: TRegistryContext);125 procedure SaveToRegistry( Context: TRegistryContext);123 procedure LoadFromRegistry(AContext: TRegistryContext); 124 procedure SaveToRegistry(AContext: TRegistryContext); 126 125 constructor Create(AOwner: TComponent); override; 127 126 destructor Destroy; override; … … 139 138 resourcestring 140 139 SModuleNotFound = 'Module "%1:s" not found as dependency for module "%0:s"'; 140 SInvalidModuleName = 'Invalid module name'; 141 141 142 142 procedure Register; … … 264 264 procedure TModuleManager.RegisterModule(Module: TModule); 265 265 begin 266 if Module.Identification = '' then 267 raise Exception.Create(SInvalidModuleName); 266 268 Modules.Add(Module); 267 269 Module.FManager := Self; … … 291 293 end; 292 294 293 procedure TModuleManager.LoadFromRegistry( Context: TRegistryContext);295 procedure TModuleManager.LoadFromRegistry(AContext: TRegistryContext); 294 296 var 295 297 I: Integer; … … 297 299 with TRegistryEx.Create do 298 300 try 299 RootKey := Context.RootKey;301 RootKey := AContext.RootKey; 300 302 for I := 0 to Modules.Count - 1 do 301 303 with TModule(Modules[I]) do begin 302 OpenKey( Context.Key + '\' + Identification, True);304 OpenKey(AContext.Key + '\' + Identification, True); 303 305 Installed := ReadBoolWithDefault('Installed', Installed); 304 306 Enabled := ReadBoolWithDefault('Enabled', Enabled); … … 309 311 end; 310 312 311 procedure TModuleManager.SaveToRegistry( Context: TRegistryContext);313 procedure TModuleManager.SaveToRegistry(AContext: TRegistryContext); 312 314 var 313 315 I: Integer; … … 315 317 with TRegistryEx.Create do 316 318 try 317 RootKey := Context.RootKey;319 RootKey := AContext.RootKey; 318 320 for I := 0 to Modules.Count - 1 do 319 321 with TModule(Modules[I]) do begin 320 OpenKey( Context.Key + '\' + Identification, True);322 OpenKey(AContext.Key + '\' + Identification, True); 321 323 WriteBool('Enabled', Enabled); 322 324 WriteBool('Installed', Installed); -
trunk/UCore.lfm
r56 r59 7 7 VerticalOffset = 174 8 8 Width = 324 9 object ApplicationInfo1: TApplicationInfo10 Identification = 111 VersionMajor = 112 VersionMinor = 013 VersionBugFix = 014 VersionSuffix = 'alfa'15 CompanyName = 'Chronosoft'16 AuthorsName = 'Chronos'17 EmailContact = 'robie@centrum.cz'18 AppName = 'Docházka'19 ReleaseDate = 4122820 RegistryKey = '\Software\Chronosoft\Dochazka'21 RegistryRoot = rrKeyCurrentUser22 left = 8823 top = 7224 end25 9 object Database: TSqlDatabase 26 10 Connected = False -
trunk/UCore.pas
r58 r59 11 11 12 12 type 13 TChronisPlatform = class; 13 14 14 15 { TCore } 15 16 16 17 TCore = class(TDataModule) 17 ApplicationInfo1: TApplicationInfo;18 18 CoolTranslator1: TCoolTranslator; 19 19 Database: TSqlDatabase; … … 23 23 procedure ModuleManagerUpdate(Sender: TObject); 24 24 private 25 FRegistryContext: TRegistryContext; 26 procedure SetRegistryContext(AValue: TRegistryContext); 25 27 public 28 Platform: TChronisPlatform; 26 29 FormModuleList: TFormModuleList; 27 30 FormList: TForm; 28 31 PersistentForm: TPersistentForm; 29 RegistryContext: TRegistryContext;30 32 procedure Init; 31 33 procedure Done; … … 34 36 procedure LoadFromRegistry(AContext: TRegistryContext); 35 37 procedure SaveToRegistry(AContext: TRegistryContext); 38 property RegistryContext: TRegistryContext read FRegistryContext 39 write SetRegistryContext; 36 40 end; 37 41 … … 39 43 40 44 TChronisPlatform = class(TComponent) 45 private 46 FOnRegisterModules: TNotifyEvent; 47 FOnUnregisterModules: TNotifyEvent; 48 FRegistryContext: TRegistryContext; 49 procedure SetRegistryContext(AValue: TRegistryContext); 41 50 public 42 51 constructor Create(AOwner: TComponent); override; … … 44 53 procedure Init; 45 54 procedure Done; 55 property RegistryContext: TRegistryContext read FRegistryContext 56 write SetRegistryContext; 57 published 58 property OnRegisterModules: TNotifyEvent read FOnRegisterModules 59 write FOnRegisterModules; 60 property OnUnregisterModules: TNotifyEvent read FOnUnregisterModules 61 write FOnUnregisterModules; 46 62 end; 47 63 … … 56 72 57 73 uses 58 UFormMain, UFormConnection ;74 UFormMain, UFormConnection, UFormSetting; 59 75 60 76 procedure Register; … … 65 81 { TChronisPlatform } 66 82 83 procedure TChronisPlatform.SetRegistryContext(AValue: TRegistryContext); 84 begin 85 if FRegistryContext = AValue then Exit; 86 FRegistryContext := AValue; 87 if Assigned(Core) then Core.RegistryContext := AValue; 88 end; 89 67 90 constructor TChronisPlatform.Create(AOwner: TComponent); 68 91 begin … … 78 101 begin 79 102 Application.CreateForm(TCore, Core); 80 Application.CreateForm(TFormMain, FormMain); 103 Core.Platform := Self; 104 Core.RegistryContext := FRegistryContext; 105 Application.CreateForm(TFormMain, FormMain); // first form 81 106 Application.CreateForm(TFormConnection, FormConnection); 107 Application.CreateForm(TFormSetting, FormSetting); 82 108 //Core := TCore.Create(Application); 83 109 //FormMain := TFormMain.Create(Application); … … 87 113 procedure TChronisPlatform.Done; 88 114 begin 89 FormConnection.Free; 90 FormMain.Free; 91 Core.Free; 115 (* FreeAndNil(FormSetting); 116 FreeAndNil(FormConnection); 117 FreeAndNil(FormMain); 118 FreeAndNil(Core); *) 92 119 end; 93 120 … … 98 125 begin 99 126 PersistentForm := TPersistentForm.Create; 100 PersistentForm.RegistryContext := RegContext(HKEY(ApplicationInfo1.RegistryRoot),101 ApplicationInfo1.RegistryKey + '\Forms');102 RegistryContext := RegContext(HKEY(ApplicationInfo1.RegistryRoot), ApplicationInfo1.RegistryKey);103 127 end; 104 128 … … 113 137 FormModuleList.Reload; 114 138 FormMain.ReloadPages; 139 end; 140 141 procedure TCore.SetRegistryContext(AValue: TRegistryContext); 142 begin 143 if (FRegistryContext.RootKey = AValue.RootKey) and 144 (FRegistryContext.Key = AValue.Key) then Exit; 145 FRegistryContext := AValue; 146 PersistentForm.RegistryContext := RegContext(RegistryContext.RootKey, 147 RegistryContext.Key + '\Forms'); 115 148 end; 116 149 … … 126 159 try 127 160 Context := RegistryContext; 128 //RegisterModules(ModuleManager); 161 if Assigned(Platform.OnRegisterModules) then 162 Platform.OnRegisterModules(Self); 129 163 if ReadBoolWithDefault('ModuleManagerInstalled', False) then 130 164 ModuleManager.LoadFromRegistry(RegContext(RegistryContext.RootKey, RegistryContext.Key + '\Modules')) … … 151 185 if Assigned(FormModuleList) then FreeAndNil(FormModuleList); 152 186 ModuleManager.OnUpdate := nil; 153 //UnregisterModules(ModuleManager); 187 if Assigned(Platform.OnUnregisterModules) then 188 Platform.OnUnregisterModules(Self); 154 189 end; 155 190
Note:
See TracChangeset
for help on using the changeset viewer.