- Timestamp:
- Mar 12, 2012, 10:23:40 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Clients/UChronisClientMySQL.pas
r44 r45 40 40 SMissingBaseType = 'Missing base typ for %s'; 41 41 SUndefinedType = 'Undefinned type %s'; 42 SCantLoadObjectWithoutId = 'Can''t load object without id'; 42 43 43 44 … … 69 70 Table: string; 70 71 begin 72 if AObject.Id = 0 then raise Exception.Create(SCantLoadObjectWithoutId); 71 73 try 72 74 DbRows := TDbRows.Create; -
trunk/Application/UApplicationInfo.pas
r41 r45 50 50 Name := 'ChronIS'; 51 51 Identification := 1; 52 ReleaseDate := EncodeDate(2012, 3, 9);52 ReleaseDate := EncodeDate(2012, 3, 12); 53 53 MajorVersion := 0; 54 54 MinorVersion := 1; -
trunk/Application/UChronisClient.pas
r44 r45 112 112 end; 113 113 114 115 114 implementation 116 115 … … 251 250 NewProxy.Load; 252 251 if NewProxy.Objects.Count > 0 then begin 253 DbVersion := TObjectProxy(NewProxy.Objects[0]).Properties.Values['Version']; 252 NewObject := TObjectProxy.Create; 253 NewObject.Client := Self; 254 NewObject.SchemaName := Schema; 255 NewObject.ObjectName := SystemVersionObject; 256 NewObject.Id := 1; 257 NewObject.Load; 258 259 DbVersion := NewObject.Properties.Values['Version']; 254 260 if Version <> DbVersion then 255 261 raise Exception.Create(Format(SVersionMismatch, [Version, DbVersion])); -
trunk/Application/UDataTypes.pas
r42 r45 270 270 Proxy.ObjectName := PropertyTable; 271 271 Proxy.Condition := 'Id=' + IntToStr(PropertyID); 272 Proxy.Load; 272 273 ObjectId := StrToInt(TObjectProxy(Proxy.Objects[0]).Properties.Values['Object']); 273 274 PropertyName := TObjectProxy(Proxy.Objects[0]).Properties.Values['ColumnName']; -
trunk/Forms/UFormMain.lfm
r43 r45 153 153 object PanelMenu: TPanel 154 154 Left = 0 155 Height = 407156 Top = 0155 Height = 381 156 Top = 26 157 157 Width = 184 158 158 Align = alLeft 159 159 BevelOuter = bvNone 160 ClientHeight = 407160 ClientHeight = 381 161 161 ClientWidth = 184 162 162 TabOrder = 0 … … 171 171 object TreeView1: TTreeView 172 172 Left = 4 173 Height = 3 83173 Height = 357 174 174 Top = 19 175 175 Width = 180 … … 186 186 object PanelData: TPanel 187 187 Left = 189 188 Height = 407189 Top = 0188 Height = 381 189 Top = 26 190 190 Width = 451 191 191 Align = alClient … … 195 195 object Splitter1: TSplitter 196 196 Left = 184 197 Height = 407198 Top = 0197 Height = 381 198 Top = 26 199 199 Width = 5 200 200 end … … 216 216 SimplePanel = False 217 217 end 218 object ToolBar1: TToolBar 219 Left = 0 220 Height = 26 221 Top = 0 222 Width = 640 223 Images = ImageListActions 224 ParentShowHint = False 225 ShowHint = True 226 TabOrder = 4 227 object ToolButton1: TToolButton 228 Left = 1 229 Top = 2 230 Action = AConnect 231 end 232 object ToolButton2: TToolButton 233 Left = 24 234 Top = 2 235 Action = ADisconnect 236 end 237 object ToolButton3: TToolButton 238 Left = 47 239 Top = 2 240 Width = 10 241 Style = tbsSeparator 242 end 243 object ToolButton4: TToolButton 244 Left = 57 245 Top = 2 246 Action = ASettings 247 end 248 object ToolButton5: TToolButton 249 Left = 80 250 Top = 2 251 Action = AToggleFullscreen 252 end 253 end 218 254 object ActionListItem: TActionList 219 255 Images = ImageListActions … … 223 259 Category = 'ObjectGroup' 224 260 Caption = 'Delete' 261 OnExecute = AObjectGroupDeleteExecute 225 262 end 226 263 object AObjectGroupAddGroup: TAction … … 262 299 Caption = 'Connect' 263 300 Hint = 'Connect' 301 ImageIndex = 10 264 302 OnExecute = AConnectExecute 265 303 end … … 267 305 Caption = 'Settings' 268 306 Hint = 'Settings' 307 ImageIndex = 11 269 308 OnExecute = ASettingsExecute 270 309 end … … 279 318 object ADisconnect: TAction 280 319 Caption = 'Disconnect' 320 ImageIndex = 9 281 321 OnExecute = ADisconnectExecute 282 322 end … … 339 379 top = 56 340 380 Bitmap = { 341 4C690 90000001000000010000000000000000000000000000000000000000000381 4C690C0000001000000010000000000000000000000000000000000000000000 342 382 0000000000000000000000000000000000000000000000000000000000000000 343 383 000000000000000000000000000000000000000000000000000000000000F4F9 … … 627 667 FFFFFFFFFFFFFFFFFFFF858A88FF8186849D858A88FF858A88FF858A88FF858A 628 668 88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A 629 88FF858A88FF858A88FF7F8382A0 669 88FF858A88FF858A88FF7F8382A0E8DCCCFF393939FFB98C5700B98C5700B98C 670 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C 671 5700B98C5700B98C5700B98C57000C0C0CFFE9DDCCFF555555FF555555FF5555 672 55FF555555FF555555FFB98C5700B98C5700B98C5700B98C5700B98C5700B98C 673 5700B98C5700B98C5700B98C5700777777FF393939FFB88C57FFE9DDCCFFE9DD 674 CCFFE8DCCCFFE8DCCCFF555555FFB98C5700B98C5700B98C5700B98C5700B98C 675 5700B98C5700B98C5700B98C5700B98C57000C0C0CFFE8DCCCFFB88C57FFB88C 676 57FFB88C57FFB88C57FFB88C57FF0C0C0CFFB98C5700B98C5700B98C5700B98C 677 5700B98C5700B98C5700B98C5700B98C57000C0C0CFFE8DCCCFFB88C57FFB88C 678 57FFB88C57FFB88C57FF0C0C0CFF777777FFB98C5700B98C5700B98C5700B98C 679 5700B98C5700B98C5700B98C5700B98C57000C0C0CFFE8DCCCFFB88C57FFB88C 680 57FFB88C57FF0C0C0CFF777777FF969696FFB98C5700B98C5700B98C5700B98C 681 5700B98C5700B98C5700B98C5700B98C57000C0C0CFFE8DCCCFFB88C57FFB88C 682 57FF0C0C0CFF777777FF969696FFB98C5700B98C5700003366FFB98C5700B98C 683 5700B98C5700B98C5700B98C5700B98C5700777777FF0C0C0CFFB88C57FF0C0C 684 0CFF777777FF969696FFB98C5700B98C5700003366FFE9DDCCFF777777FF0C0C 685 0CFFB98C5700B98C5700B98C5700B98C5700B98C5700777777FF0C0C0CFF7777 686 77FF969696FFB98C5700B98C5700003366FFE9DDCCFFE9DDCCFF0C0C0CFFE9DD 687 CCFF0C0C0CFFB98C5700B98C5700B98C5700B98C5700B98C5700777777FF9696 688 96FFB98C5700B98C5700003366FFE9DDCCFFE9DDCCFF0C0C0CFFE9DDCCFFB88C 689 57FFB88C57FF0C0C0CFFB98C5700B98C5700B98C5700B98C5700B98C5700B98C 690 5700B98C5700003366FFE9DDCCFFE9DDCCFF0C0C0CFFE9DDCCFFB88C57FFB88C 691 57FFB88C57FF0C0C0CFFB98C5700B98C5700B98C5700B98C5700B98C5700B98C 692 5700B98C5700969696FF777777FF0C0C0CFFE9DDCCFFB88C57FFB88C57FFB88C 693 57FFB88C57FF0C0C0CFFB98C5700B98C5700B98C5700B98C5700B98C5700B98C 694 5700B98C5700B98C57000C0C0CFFE8DCCCFFB88C57FFB88C57FFB88C57FFB88C 695 57FFB88C57FF0C0C0CFFB98C5700B98C5700B98C5700B98C5700B98C5700B98C 696 5700B98C5700B98C5700777777FF0C0C0CFFB88C57FFB88C57FFB88C57FFB88C 697 57FFB88C57FF0C0C0CFFB98C5700B98C5700B98C5700B98C5700B98C5700B98C 698 5700B98C5700B98C5700B98C5700777777FF0C0C0CFF0C0C0CFF0C0C0CFF0C0C 699 0CFF0C0C0CFFE9DDCCFF393939FFB98C5700B98C5700B98C5700B98C5700B98C 700 5700B98C5700B98C5700B98C5700B98C5700969696FF969696FF969696FF9696 701 96FF969696FF0C0C0CFFE8DCCCFFE9DDCDFF555555FFB98C5700B98C5700B98C 702 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C 703 5700B98C5700B98C5700B98C57000C0C0CFFEADECDFF555555FFB98C5700B98C 704 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C 705 5700B98C5700B98C5700B98C5700B98C57000C0C0CFFEADECDFF555555FFB98C 706 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C 707 5700B98C5700B98C5700B98C5700B98C5700B98C57000C0C0CFFEADECDFF5555 708 55FF555555FF555555FF555555FF555555FFB98C5700B98C5700B98C5700B98C 709 5700B98C5700B98C5700B98C5700B98C5700B98C5700777777FF555555FFB98C 710 57FFEADECDFFEADECDFFE9DDCDFFE9DDCDFF555555FFB98C5700B98C5700B98C 711 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C57000C0C0CFFE9DD 712 CDFFB98C57FFB98C57FFB98C57FFB98C57FFB98C57FF0C0C0CFFB98C5700B98C 713 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C57000C0C0CFFE9DD 714 CDFFB98C57FFB98C57FFB98C57FFB98C57FF0C0C0CFFEADECDFF555555FFB98C 715 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C57000C0C0CFFE9DD 716 CDFFB98C57FFB98C57FFB98C57FF0C0C0CFFEADECDFFB98C57FFB98C57FF0C0C 717 0CFFB98C5700B98C5700B98C5700B98C5700B98C5700B98C57000C0C0CFFE9DD 718 CDFFB98C57FFB98C57FF0C0C0CFFEADECDFFB98C57FFB98C57FFB98C57FF0C0C 719 0CFFB98C5700B98C5700B98C5700B98C5700B98C5700B98C5700969696FF0C0C 720 0CFFB98C57FF0C0C0CFFEADECDFFB98C57FFB98C57FFB98C57FFB98C57FF0C0C 721 0CFFB98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C57007777 722 77FF0C0C0CFFEADECDFFB98C57FFB98C57FFB98C57FFB98C57FFB98C57FF0C0C 723 0CFFB98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C 724 5700777777FF0C0C0CFFB98C57FFB98C57FFB98C57FFB98C57FFB98C57FF0C0C 725 0CFFB98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C 726 5700B98C5700777777FF0C0C0CFF0C0C0CFF0C0C0CFF0C0C0CFF0C0C0CFFE9DD 727 CDFF555555FFB98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C 728 5700B98C5700B98C5700969696FF969696FF969696FF969696FF969696FF0C0C 729 0CFFEADECDFF555555FFB98C5700B98C5700B98C5700B98C5700B98C5700B98C 730 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C 731 57000C0C0CFFEADECDFF555555FFB98C5700B98C5700B98C5700B98C5700B98C 732 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C 733 5700B98C57000C0C0CFFE9DDCDFF000000000000000000000000000000000000 734 000000000000A19588FF9C9083FF9C9083FFA19588FF00000000000000000000 735 00000000000000000000000000000000000000000000000000009C9083FF9C90 736 83FF00000000998D80FFFFFFFFFFFFFFFFFF998D80FF000000009C9083FF9C90 737 83FF0000000000000000000000000000000000000000998F83FFCCC5BEFFF6F1 738 EEFF908377FF908377FFEDE7E0FFEDE7E0FF908377FF908377FFF6F1EEFFCCC5 739 BEFFA9A096FF000000000000000000000000675D50FFCDC6BFFFF6F1EEFFF8F7 740 F4FFF8F7F4FFFFFFFFFFFCFDFDFFFCFDFDFFFFFFFFFFF8F7F4FFF8F7F4FFF6F1 741 EEFFCDC6BFFF696053FF0000000000000000696053FFF6F1EEFFBBAC9DFFDFD8 742 D3FFEEEFEFFFEBE7E2FFE3D9D1FFE3D9D1FFEBE7E2FFEEEFEFFFDFD8D3FFBBAC 743 9DFFF6F1EEFF696053FF000000000000000000000000696053FFDFDFDEFFDFDF 744 DEFFD1C4BAFF8E8377FF44392EFF44392EFF8E8377FFD1C4BAFFDFDFDEFFDFDF 745 DEFF696053FF00000000000000008E8378FF897D72FF84796CFFD8D5D3FFC9C2 746 B9FFA99C90FF594F45FFFFFFFFFFFFFFFFFF60564DFFA99C90FFC9C2B9FFD8D5 747 D3FF84796CFF897D72FF8E8378FF877B70FFFFFFFFFFFFFFFFFFBFBCB8FFD6CD 748 C5FF695E53FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF695E53FFD6CDC5FFBFBC 749 B8FFFFFFFFFFFFFFFFFF877B70FF897E74FFE8E0D7FFE8E0D7FFB0ACA8FFE8E3 750 DDFF695E53FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF695E53FFE8E3DDFFB0AC 751 A8FFE8E0D7FFE8E0D7FF897E74FF463B2FFF3E3328FF61564CFFAFA8A4FFC1BC 752 B6FFAFA8A4FF695E53FFFFFFFFFFFFFFFFFF695E53FFAFA8A4FFC1BCB6FFAFA8 753 A4FF61564CFF3E3328FF463B2FFF000000000000000061564CFFE1D9D1FFACA3 754 9BFFE4E1DCFFAFA8A4FF695E53FF695E53FFAFA8A4FFE4E1DCFFACA39BFFE1D9 755 D1FF61564CFF0000000000000000000000003F3428FFE1D9D1FFEBE7E2FFE1D9 756 D1FFAEA7A0FFE2DDDAFFB7B1ABFFB7B1ABFFE2DDDAFFAEA7A0FFE1D9D1FFEBE7 757 E2FFE1D9D1FF3F3428FF00000000000000003F3428FFB6B0A9FFE1D9D1FFC8BE 758 B4FFE1D9D1FFC8BEB4FFEDE5DDFFEDE5DDFFC8BEB4FFE1D9D1FFC8BEB4FFE1D9 759 D1FFB6B0A9FF3F3428FF0000000000000000000000003F3428FF877D73FFE1D9 760 D1FF574D42FF766C63FFEDE5DDFFEDE5DDFF766C63FF574D42FFE1D9D1FF877D 761 73FF3F3428FF00000000000000000000000000000000000000003F3428FF3F34 762 28FF00000000776D66FFE5DBD2FFE5DBD2FF776D66FF000000003F3428FF3F34 763 28FF000000000000000000000000000000000000000000000000000000000000 764 0000000000003F3428FF3F3428FF3F3428FF3F3428FF00000000000000000000 765 0000000000000000000000000000 630 766 } 631 767 end … … 645 781 object MenuItem14: TMenuItem 646 782 Action = AExit 783 Bitmap.Data = { 784 36040000424D3604000000000000360000002800000010000000100000000100 785 2000000000000004000064000000640000000000000000000000000000000000 786 0000000000000000000000000000000000FF0000000000000000000000000000 787 0000000000000000000000000000000000000000000000000000000000000000 788 00000000000000000000000000FF000000FF0000000000000000000000000000 789 0000000000000000000000000000000000000000000000000000000000000000 790 000000000000000000FF008484FF000000FF0000000000000000000000000000 791 0000000000000000000000000000000000000000000000000000000000000000 792 0000000000FF008484FF008484FF000000FF0000000000000000000000000000 793 0000000000000000000000000000000000000000000000000000000000FF0000 794 00FF008484FF008484FF008484FF000000FF000000FF000000FF000000FF0000 795 00FF000000FF000000FF000000FF000000000000000000000000000000000000 796 00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000 797 0000000000000000000000000000000000000000000000000000000000000000 798 00FF008484FF008484FF000000FF000000FFFFFFFFFFFFFFFFFF000000FF0000 799 0000000000000000000000000000840000FF0000000000000000000000000000 800 00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000 801 00000000000000000000840000FF840000FF0000000000000000000000000000 802 00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000 803 000000000000840000FF840000FF840000FF840000FF840000FF000000000000 804 00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000 805 0000840000FF840000FF840000FF840000FF840000FF840000FF000000000000 806 00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000 807 000000000000840000FF840000FF840000FF840000FF840000FF000000000000 808 00FF008484FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000 809 00000000000000000000840000FF840000FF0000000000000000000000000000 810 00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000 811 0000000000000000000000000000840000FF0000000000000000000000000000 812 00FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000 813 0000000000000000000000000000000000000000000000000000000000000000 814 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 815 0000000000000000000000000000000000000000000000000000000000000000 816 0000000000000000000000000000000000000000000000000000000000000000 817 0000000000000000000000000000000000000000000000000000 818 } 647 819 end 648 820 end … … 651 823 object MenuItem15: TMenuItem 652 824 Action = AToggleFullscreen 825 Bitmap.Data = { 826 36040000424D3604000000000000360000002800000010000000100000000100 827 20000000000000040000640000006400000000000000000000008186849D858A 828 88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A 829 88FF858A88FF858A88FF858A88FF858A88FF858A88FF7F8382A0858A88FFFFFF 830 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 831 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF858A88FF858A88FFFFFF 832 FFFFA46534FFA46534FFA46534FFA46534FFFAFBFBFFFAFBFBFFFCFCFDFFFDFC 833 FCFFA46534FFA46534FFA46534FFA46534FFFFFFFFFF858A88FF858A88FFFFFF 834 FFFFA46534FFA46534FFA46534FFF9FAFAFFF9F9F9FFF9FAF9FFFBFBFBFFFBFB 835 FCFFFBFBFCFFA46534FFA46534FFA46534FFFFFFFFFF858A88FF858A88FFFFFF 836 FFFFA46534FFA46636FFA76A3BFFAB7246FFF8F9F8FFF8F9F9FFFAFAFAFFFAFA 837 FBFFAA7043FFA56737FFA46534FFA46534FFFFFFFFFF858A88FF858A88FFFFFF 838 FFFFA46635FFF6F7F7FFAE774CFFB98B67FFC9A68BFFF7F8F8FFF9F9F9FFD1B5 839 9EFFBD916FFFAE764BFFF9FAFAFFA46534FFFFFFFFFF858A88FF858A88FFFFFF 840 FFFFF5F6F6FFF4F6F6FFF6F6F7FFCAAA90FFDBC7B7FFE6DBD3FFEAE2DBFFE4D6 841 CAFFD4BAA6FFF8F9F9FFF9FAFAFFF9F9F9FFFFFFFFFF858A88FF858A88FFFFFF 842 FFFFF3F5F5FFF3F5F5FFF4F5F5FFF4F5F6FFE3D7CCFFF5F5F6FFF6F7F7FFEAE1 843 D9FFF7F8F8FFF8F9F8FFF7F9F9FFF8F8F9FFFFFFFFFF858A88FF858A88FFFFFF 844 FFFFEFF1F1FFF0F1F1FFF0F1F2FFF0F2F1FFDFD2C7FFF0F2F2FFF2F3F4FFE2D7 845 CEFFF3F4F5FFF3F4F5FFF3F5F5FFF4F5F4FFFFFFFFFF858A88FF858A88FFFFFF 846 FFFFEFF0F0FFEFF0F0FFEFF1F1FFCFB4A0FFD8C7B9FFE0D3C9FFE2D7CDFFDCCB 847 BDFFCFB49FFFF2F4F4FFF3F4F3FFF2F4F4FFFFFFFFFF858A88FF858A88FFFFFF 848 FFFFA46635FFEDEFEFFFB3825CFFC39F83FFCFB6A2FFEEF0F0FFF0F2F1FFCCB0 849 99FFC0987AFFB27F57FFF1F3F3FFA56737FFFFFFFFFF858A88FF858A88FFFFFF 850 FFFFA46534FFA56736FFAA7043FFB4845FFFEEEFEFFFEEEFEFFFF0F1F1FFF0F1 851 F1FFAE784EFFA96E40FFA56838FFA46534FFFFFFFFFF858A88FF858A88FFFFFF 852 FFFFA46534FFA46534FFA56736FFECEEEEFFECEEEEFFECEEEFFFEEF0F0FFEEF0 853 F0FFEEF0F0FFA56736FFA46534FFA46534FFFFFFFFFF858A88FF858A88FFFFFF 854 FFFFA46534FFA46534FFA46534FFA46534FFECEEEEFFECEEEEFFEEEFEFFFEDEF 855 EFFFA46534FFA46534FFA46534FFA46534FFFFFFFFFF858A88FF858A88FFFFFF 856 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 857 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF858A88FF858A8899858A 858 88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A 859 88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A8899 860 } 653 861 end 654 862 object MenuItem16: TMenuItem -
trunk/Forms/UFormMain.pas
r44 r45 61 61 Splitter1: TSplitter; 62 62 StatusBar1: TStatusBar; 63 ToolBar1: TToolBar; 64 ToolButton1: TToolButton; 65 ToolButton2: TToolButton; 66 ToolButton3: TToolButton; 67 ToolButton4: TToolButton; 68 ToolButton5: TToolButton; 63 69 TreeView1: TTreeView; 64 70 procedure AAboutExecute(Sender: TObject); … … 69 75 procedure AObjectEditExecute(Sender: TObject); 70 76 procedure AObjectGroupAddGroupExecute(Sender: TObject); 77 procedure AObjectGroupDeleteExecute(Sender: TObject); 71 78 procedure AObjectGroupEditExecute(Sender: TObject); 72 79 procedure ASettingsExecute(Sender: TObject); … … 154 161 155 162 procedure TMainForm.UpdateInterface; 156 begin 157 ADisconnect.Enabled := Assigned(Core.Client) and Core.Client.Connected; 158 AConnect.Enabled := Assigned(Core.Client) and not Core.Client.Connected; 159 AImportStructure.Enabled := Assigned(Core.Client) and Core.Client.Connected; 163 var 164 I: Integer; 165 begin 166 ADisconnect.Enabled := Core.System.Active; 167 AConnect.Enabled := not Core.System.Active; 168 AImportStructure.Enabled := Core.System.Active; 160 169 if Assigned(MainPanelForm) then 161 170 Caption := MainPanelForm.Caption + ' - ' + ApplicationInfo.Name 162 171 else Caption := ApplicationInfo.Name; 163 172 Application.Title := Caption; 164 if Assigned(Core.Client)then165 with Core. Client do173 if Core.System.Active then 174 with Core.System.Client do 166 175 StatusBar1.Panels[0].Text := User + '@' + Host + ':' + IntToStr(Port) + '/' + Schema; 176 177 for I := 0 to ToolBar1.ButtonCount - 1 do 178 ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption; 167 179 end; 168 180 … … 201 213 202 214 procedure TMainForm.AObjectGroupAddGroupExecute(Sender: TObject); 215 begin 216 217 end; 218 219 procedure TMainForm.AObjectGroupDeleteExecute(Sender: TObject); 203 220 begin 204 221 … … 270 287 try 271 288 LoginForm := TLoginForm.Create(MainForm); 272 Core.Profiles.LoadFromRegistry(Core.RegistryRootKey, Core.RegistryKey); 273 if LoginForm.ShowModal = mrOK then begin 274 with TConnectProfile(Core.Profiles[Core.LastProfile]) do begin 275 FreeAndNil(Core.Client); 276 if Protocol = cpMySQL then Core.Client := TChronisClientMySQL.Create 277 else if Protocol = cpDirect then Core.Client := TChronisClientDirect.Create 278 else if Protocol = cpXMLRPC then Core.Client := TChronisClientXMLRPC.Create; 279 Core.System.Client := Core.Client; 280 Core.System.Client.Host := HostName; 281 Core.System.Client.Schema := Database; 282 Core.System.Client.User := Core.LastUserName; 283 Core.System.Client.Password := Core.LastPassword; 284 Core.System.Client.Port := Port; 289 Core.Profiles.LoadFromRegistry(Core.RegistryRootKey, Core.RegistryKey); 290 if LoginForm.ShowModal = mrOK then begin 291 with TConnectProfile(Core.Profiles[Core.LastProfile]) do begin 292 FreeAndNil(Core.System.Client); 293 if Protocol = cpMySQL then Core.System.Client := TChronisClientMySQL.Create 294 else if Protocol = cpDirect then Core.System.Client := TChronisClientDirect.Create 295 else if Protocol = cpXMLRPC then Core.System.Client := TChronisClientXMLRPC.Create; 296 Core.System.Client.Host := HostName; 297 Core.System.Client.Schema := Database; 298 Core.System.Client.User := Core.LastUserName; 299 Core.System.Client.Password := Core.LastPassword; 300 Core.System.Client.Port := Port; 301 end; 302 try 303 Core.System.Active := True; 304 LoadTree; 305 except 306 on E: Exception do ShowMessage(E.Message); 307 end; 285 308 end; 286 try287 Core.System.Client.Connect;288 if Core.System.IsDatabaseEmpty then Core.System.ModuleSystem.Install;289 Core.System.LoadTypes;290 LoadTree;291 UpdateInterface;292 except293 on E: Exception do ShowMessage(E.Message);294 end;295 end;296 309 finally 297 310 LoginForm.Free; 311 UpdateInterface; 298 312 end; 299 313 end; … … 302 316 begin 303 317 if Assigned(Core.System.Client) then 304 if Core.System. Client.Connectedthen begin305 Core.System. Client.Disconnect;318 if Core.System.Active then begin 319 Core.System.Active := False; 306 320 TreeView1.Items.Clear; 307 Core.System.Types.Clear;308 FreeAndNil(Core.Client);309 Core.System.Client := Core.Client;310 321 end; 311 322 UpdateInterface; -
trunk/Languages/chronis.cs.po
r44 r45 423 423 msgstr "" 424 424 425 #: uchronisclientmysql.scantloadobjectwithoutid 426 msgid "Can't load object without id" 427 msgstr "" 428 425 429 #: uchronisclientmysql.smissingbasetype 426 430 msgid "Missing base typ for %s" -
trunk/Languages/chronis.po
r44 r45 401 401 msgstr "" 402 402 403 #: uchronisclientmysql.scantloadobjectwithoutid 404 msgid "Can't load object without id" 405 msgstr "" 406 403 407 #: uchronisclientmysql.smissingbasetype 404 408 msgid "Missing base typ for %s" -
trunk/UCore.pas
r43 r45 33 33 RegistryRootKey: HKEY; 34 34 System: TChronisBase; 35 Client: TChronisClient;36 35 end; 37 36 -
trunk/USystem.pas
r44 r45 107 107 108 108 TChronisBase = class 109 private 110 FActive: Boolean; 111 procedure SetActive(AValue: Boolean); 112 public 109 113 Types: TChronisTypeList; 110 114 Client: TChronisClient; 111 //Database: TSqlDatabase;112 115 Modules: TListObject; // TListObject<TChronisModule> 113 116 ModuleSystem: TChronisModule; … … 143 146 constructor Create; 144 147 destructor Destroy; override; 148 property Active: Boolean read FActive write SetActive; 145 149 private 146 150 end; … … 266 270 end; 267 271 272 procedure TChronisBase.SetActive(AValue: Boolean); 273 begin 274 if FActive = AValue then Exit; 275 FActive := AValue; 276 if AValue then begin 277 Client.Connect; 278 if Client.Connected then begin 279 if IsDatabaseEmpty then ModuleSystem.Install; 280 LoadTypes; 281 end else FActive := False; 282 end else begin 283 Client.Disconnect; 284 FreeAndNil(Client); 285 Types.Clear; 286 end; 287 end; 288 268 289 procedure TChronisBase.RegisterModule(ModuleClass: TChronisModuleClass); 269 290 begin … … 664 685 Proxy.SchemaName := 'information_schema'; 665 686 Proxy.ObjectName := 'tables'; 666 Proxy.Condition := 'table_name = " Information" AND table_schema = "' +687 Proxy.Condition := 'table_name = "SystemModule" AND table_schema = "' + 667 688 Client.Schema + '"'; 668 689 Proxy.Load;
Note:
See TracChangeset
for help on using the changeset viewer.