Changeset 49 for trunk/Client/Forms
- Timestamp:
- Mar 21, 2012, 12:54:06 PM (13 years ago)
- Location:
- trunk/Client/Forms
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Client/Forms/UFormImportStructure.pas
r46 r49 51 51 52 52 uses 53 UCore, UFormMain ;53 UCore, UFormMain, UFormMenu; 54 54 55 55 { TSQLTable } … … 201 201 DbRows.Free; 202 202 Database.Free; 203 MainForm.LoadTree;203 FormMenu.LoadTree; 204 204 end; 205 205 end; -
trunk/Client/Forms/UFormItemEdit.pas
r46 r49 63 63 64 64 uses 65 UFormMain, UDataTypes, UCore, UFormItemAdd, UFormItemView ;65 UFormMain, UDataTypes, UCore, UFormItemAdd, UFormItemView, UFormMenu; 66 66 67 67 {$R *.lfm} … … 143 143 if (SelectedObject.Table = ObjectGroupTable) or 144 144 (SelectedObject.Table = ObjectTable) then 145 MainForm.LoadTree;145 FormMenu.LoadTree; 146 146 //MainForm.LoadItemList; 147 147 Close; -
trunk/Client/Forms/UFormMain.lfm
r46 r49 145 145 0000 146 146 } 147 Menu = MainMenu 1147 Menu = MainMenuMain 148 148 OnClose = FormClose 149 149 OnCreate = FormCreate … … 158 158 Align = alLeft 159 159 BevelOuter = bvNone 160 ClientHeight = 381161 ClientWidth = 184162 160 TabOrder = 0 163 object Label1: TLabel164 Left = 7165 Height = 14166 Top = 4167 Width = 39168 Caption = 'Groups:'169 ParentColor = False170 end171 object TreeView1: TTreeView172 Left = 4173 Height = 357174 Top = 19175 Width = 180176 Anchors = [akTop, akLeft, akRight, akBottom]177 DefaultItemHeight = 16178 Images = ImageListActions179 ReadOnly = True180 TabOrder = 0181 OnChange = TreeView1Change182 OnDblClick = TreeView1DblClick183 Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]184 end185 161 end 186 162 object PanelData: TPanel … … 256 232 left = 360 257 233 top = 120 258 object AObjectGroupDelete: TAction259 Category = 'ObjectGroup'260 Caption = 'Delete'261 OnExecute = AObjectGroupDeleteExecute262 end263 object AObjectGroupAddGroup: TAction264 Category = 'ObjectGroup'265 Caption = 'Add group'266 OnExecute = AObjectGroupAddGroupExecute267 end268 object AObjectGroupAddObject: TAction269 Category = 'ObjectGroup'270 Caption = 'Add object'271 end272 object AObjectGroupEdit: TAction273 Category = 'ObjectGroup'274 Caption = 'Edit'275 OnExecute = AObjectGroupEditExecute276 end277 object AObjectDelete: TAction278 Category = 'Object'279 Caption = 'Delete'280 end281 object AObjectEdit: TAction282 Category = 'Object'283 Caption = 'Edit'284 OnExecute = AObjectEditExecute285 end286 234 object AExit: TAction 287 235 Caption = 'Exit' … … 342 290 Caption = 'Add' 343 291 ShortCut = 16449 344 end345 end346 object PopupMenuObject: TPopupMenu347 Images = ImageListActions348 left = 72349 top = 136350 object MenuItem9: TMenuItem351 Action = AObjectDelete352 end353 object MenuItem10: TMenuItem354 Action = AObjectEdit355 OnClick = AObjectEditExecute356 end357 end358 object PopupMenuObjectGroup: TPopupMenu359 Images = ImageListActions360 left = 72361 top = 88362 object MenuItem5: TMenuItem363 Action = AObjectGroupAddGroup364 OnClick = AObjectGroupAddGroupExecute365 end366 object MenuItem7: TMenuItem367 Action = AObjectGroupAddObject368 end369 object MenuItem8: TMenuItem370 Action = AObjectGroupEdit371 OnClick = AObjectGroupEditExecute372 end373 object MenuItem6: TMenuItem374 Action = AObjectGroupDelete375 292 end 376 293 end … … 541 458 0000000000000000000000000000000000000000000000000000000000000000 542 459 0000000000000000000000000000000000000000000000000000000000000000 543 00000000000000000000FFFFFF00000000001818C0FF1818C0FFC0C0C0FF0000 544 0000000000000000000000000000000000000000000000000000000000001818 545 C0FF1818C0FFC0C0C0FFFFFFFF00000000002020C8FF2020C8FF2020C8FF2020 546 C8FFC0C0C0FF00000000000000000000000000000000000000002020C8FF2020 547 C8FFC0C0C0FF00000000FFFFFF0000000000000000002626CEFF2626CEFF2626 548 CEFF2626CEFFC0C0C0FF0000000000000000000000002626CEFF2626CEFFC0C0 549 C0FF000000000000000001010100000000000000000000000000000000002929 550 D1FF2929D1FF2929D1FFC0C0C0FF000000002929D1FFC0C0C0FF000000000000 551 0000000000000000000001010100000000000000000000000000000000000000 552 00002C2CD4FF2C2CD4FF2C2CD4FF2C2CD4FF2C2CD4FFC0C0C0FF000000000000 553 0000000000000000000001010108000000000000000000000000000000000000 554 0000000000002F2FD7FF2F2FD7FF2F2FD7FFC0C0C0FF00000000000000000000 555 0000000000000000000003030348000000000000000000000000000000000000 556 00003232DAFF3232DAFF3232DAFF3232DAFF3232DAFFC0C0C0FF000000000000 557 00000000000000000000030303A0000000000000000000000000000000003535 558 DDFF3535DDFF3535DDFFC0C0C0FF000000003535DDFF3535DDFFC0C0C0FF0000 559 00000000000000000000030303410000000000000000000000003838E0FF3838 560 E0FF3838E0FFC0C0C0FF0000000000000000000000003838E0FF3838E0FFC0C0 561 C0FF00000000000000000303030700000000000000003A3AE2FF3A3AE2FF3A3A 562 E2FFC0C0C0FF00000000000000000000000000000000000000003A3AE2FFC0C0 563 C0FF00000000000000000303030000000000000000003A3AE2FF3A3AE2FF3A3A 564 E2FFC0C0C0FF0000000000000000000000000000000000000000000000003A3A 565 E2FFC0C0C0FF00000000030303000000000000000000000000003A3AE2FFC0C0 460 0000000000000000000000000000000000000000000000000000000000000000 461 0000000000000000000000000000000000000000000000000000000000000000 462 000000000000000000000000000000000000000000001818C0FF1818C0FFC0C0 566 463 C0FF000000000000000000000000000000000000000000000000000000000000 567 00000000000000000000FFFFFF00000000000000000000000000000000000000 568 0000000000000000000000000000000000000000000000000000000000000000 569 00003A3AE2FFC0C0C0FFFFFFFF00000000000000000000000000000000000000 570 0000000000000000000000000000000000000000000000000000000000000000 571 00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 572 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 573 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 464 00001818C0FF1818C0FFC0C0C0FF00000000000000002020C8FF2020C8FF2020 465 C8FF2020C8FFC0C0C0FF00000000000000000000000000000000000000002020 466 C8FF2020C8FFC0C0C0FF000000000000000000000000000000002626CEFF2626 467 CEFF2626CEFF2626CEFFC0C0C0FF0000000000000000000000002626CEFF2626 468 CEFFC0C0C0FF0000000000000000000000000000000000000000000000000000 469 00002929D1FF2929D1FF2929D1FFC0C0C0FF000000002929D1FFC0C0C0FF0000 470 0000000000000000000000000000000000000000000000000000000000000000 471 0000000000002C2CD4FF2C2CD4FF2C2CD4FF2C2CD4FF2C2CD4FFC0C0C0FF0000 472 0000000000000000000000000000000000000000000000000000000000000000 473 000000000000000000002F2FD7FF2F2FD7FF2F2FD7FFC0C0C0FF000000000000 474 0000000000000000000000000000000000000000000000000000000000000000 475 0000000000003232DAFF3232DAFF3232DAFF3232DAFF3232DAFFC0C0C0FF0000 476 0000000000000000000000000000000000000000000000000000000000000000 477 00003535DDFF3535DDFF3535DDFFC0C0C0FF000000003535DDFF3535DDFFC0C0 478 C0FF000000000000000000000000000000000000000000000000000000003838 479 E0FF3838E0FF3838E0FFC0C0C0FF0000000000000000000000003838E0FF3838 480 E0FFC0C0C0FF00000000000000000000000000000000000000003A3AE2FF3A3A 481 E2FF3A3AE2FFC0C0C0FF00000000000000000000000000000000000000003A3A 482 E2FFC0C0C0FF00000000000000000000000000000000000000003A3AE2FF3A3A 483 E2FF3A3AE2FFC0C0C0FF00000000000000000000000000000000000000000000 484 00003A3AE2FFC0C0C0FF00000000000000000000000000000000000000003A3A 485 E2FFC0C0C0FF0000000000000000000000000000000000000000000000000000 486 0000000000000000000000000000000000000000000000000000000000000000 487 0000000000000000000000000000000000000000000000000000000000000000 488 0000000000003A3AE2FFC0C0C0FF000000000000000000000000000000000000 489 0000000000000000000000000000000000000000000000000000000000000000 490 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 574 491 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 575 492 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF … … 766 683 } 767 684 end 768 object MainMenu 1: TMainMenu685 object MainMenuMain: TMainMenu 769 686 Images = ImageListActions 770 687 left = 456 … … 774 691 object MenuItem17: TMenuItem 775 692 Action = AConnect 776 OnClick = MenuItem17Click 693 Bitmap.Data = { 694 36040000424D3604000000000000360000002800000010000000100000000100 695 2000000000000004000064000000640000000000000000000000B98C5700B98C 696 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C 697 5700B98C5700B98C5700B98C5700B98C57000C0C0CFFE9DDCDFFB98C5700B98C 698 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C 699 5700B98C5700B98C5700B98C57000C0C0CFFEADECDFF555555FFB98C5700B98C 700 5700B98C5700B98C5700B98C5700B98C5700B98C5700969696FF969696FF9696 701 96FF969696FF969696FF0C0C0CFFEADECDFF555555FFB98C5700B98C5700B98C 702 5700B98C5700B98C5700B98C5700B98C5700777777FF0C0C0CFF0C0C0CFF0C0C 703 0CFF0C0C0CFF0C0C0CFFE9DDCDFF555555FFB98C5700B98C5700B98C5700B98C 704 5700B98C5700B98C5700B98C5700777777FF0C0C0CFFB98C57FFB98C57FFB98C 705 57FFB98C57FFB98C57FF0C0C0CFFB98C5700B98C5700B98C5700B98C5700B98C 706 5700B98C5700B98C5700777777FF0C0C0CFFEADECDFFB98C57FFB98C57FFB98C 707 57FFB98C57FFB98C57FF0C0C0CFFB98C5700B98C5700B98C5700B98C5700B98C 708 5700B98C5700969696FF0C0C0CFFB98C57FF0C0C0CFFEADECDFFB98C57FFB98C 709 57FFB98C57FFB98C57FF0C0C0CFFB98C5700B98C5700B98C5700B98C5700B98C 710 5700B98C57000C0C0CFFE9DDCDFFB98C57FFB98C57FF0C0C0CFFEADECDFFB98C 711 57FFB98C57FFB98C57FF0C0C0CFFB98C5700B98C5700B98C5700B98C5700B98C 712 5700B98C57000C0C0CFFE9DDCDFFB98C57FFB98C57FFB98C57FF0C0C0CFFEADE 713 CDFFB98C57FFB98C57FF0C0C0CFFB98C5700B98C5700B98C5700B98C5700B98C 714 5700B98C57000C0C0CFFE9DDCDFFB98C57FFB98C57FFB98C57FFB98C57FF0C0C 715 0CFFEADECDFF555555FFB98C5700B98C5700B98C5700B98C5700B98C5700B98C 716 5700B98C57000C0C0CFFE9DDCDFFB98C57FFB98C57FFB98C57FFB98C57FFB98C 717 57FF0C0C0CFFB98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C 718 5700777777FF555555FFB98C57FFEADECDFFEADECDFFE9DDCDFFE9DDCDFF5555 719 55FFB98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C 720 57000C0C0CFFEADECDFF555555FF555555FF555555FF555555FF555555FFB98C 721 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C57000C0C 722 0CFFEADECDFF555555FFB98C5700B98C5700B98C5700B98C5700B98C5700B98C 723 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C57000C0C0CFFEADE 724 CDFF555555FFB98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C 725 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700E9DDCDFF5555 726 55FFB98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C 727 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700 728 } 777 729 end 778 730 object MenuItem22: TMenuItem 779 731 Action = ADisconnect 732 Bitmap.Data = { 733 36040000424D3604000000000000360000002800000010000000100000000100 734 2000000000000004000064000000640000000000000000000000B98C5700B98C 735 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C57009696 736 96FF969696FF969696FF969696FF969696FF0C0C0CFFE8DCCCFFB98C5700B98C 737 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700777777FF0C0C 738 0CFF0C0C0CFF0C0C0CFF0C0C0CFF0C0C0CFFE9DDCCFF393939FFB98C5700B98C 739 5700B98C5700B98C5700B98C5700B98C5700B98C5700777777FF0C0C0CFFB88C 740 57FFB88C57FFB88C57FFB88C57FFB88C57FF0C0C0CFFB98C5700B98C5700B98C 741 5700B98C5700B98C5700B98C5700B98C5700B98C57000C0C0CFFE8DCCCFFB88C 742 57FFB88C57FFB88C57FFB88C57FFB88C57FF0C0C0CFFB98C5700B98C5700B98C 743 5700B98C5700B98C5700B98C5700B98C5700969696FF777777FF0C0C0CFFE9DD 744 CCFFB88C57FFB88C57FFB88C57FFB88C57FF0C0C0CFFB98C5700B98C5700B98C 745 5700B98C5700B98C5700B98C5700B98C5700003366FFE9DDCCFFE9DDCCFF0C0C 746 0CFFE9DDCCFFB88C57FFB88C57FFB88C57FF0C0C0CFFB98C5700B98C5700B98C 747 5700B98C5700777777FF969696FFB98C5700B98C5700003366FFE9DDCCFFE9DD 748 CCFF0C0C0CFFE9DDCCFFB88C57FFB88C57FF0C0C0CFFB98C5700B98C5700B98C 749 5700777777FF0C0C0CFF777777FF969696FFB98C5700B98C5700003366FFE9DD 750 CCFFE9DDCCFF0C0C0CFFE9DDCCFF0C0C0CFFB98C5700B98C5700B98C57007777 751 77FF0C0C0CFFB88C57FF0C0C0CFF777777FF969696FFB98C5700B98C57000033 752 66FFE9DDCCFF777777FF0C0C0CFFB98C5700B98C5700B98C5700B98C57000C0C 753 0CFFE8DCCCFFB88C57FFB88C57FF0C0C0CFF777777FF969696FFB98C5700B98C 754 5700003366FFB98C5700B98C5700B98C5700B98C5700B98C5700B98C57000C0C 755 0CFFE8DCCCFFB88C57FFB88C57FFB88C57FF0C0C0CFF777777FF969696FFB98C 756 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C57000C0C 757 0CFFE8DCCCFFB88C57FFB88C57FFB88C57FFB88C57FF0C0C0CFF777777FFB98C 758 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C57000C0C 759 0CFFE8DCCCFFB88C57FFB88C57FFB88C57FFB88C57FFB88C57FF0C0C0CFFB98C 760 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700777777FF3939 761 39FFB88C57FFE9DDCCFFE9DDCCFFE8DCCCFFE8DCCCFF555555FFB98C5700B98C 762 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C57000C0C0CFFE9DD 763 CCFF555555FF555555FF555555FF555555FF555555FFB98C5700B98C5700B98C 764 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700E8DCCCFF3939 765 39FFB98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C 766 5700B98C5700B98C5700B98C5700B98C5700B98C5700B98C5700 767 } 780 768 end 781 769 object MenuItem14: TMenuItem … … 862 850 object MenuItem16: TMenuItem 863 851 Action = ASettings 852 Bitmap.Data = { 853 36040000424D3604000000000000360000002800000010000000100000000100 854 2000000000000004000064000000640000000000000000000000000000000000 855 0000000000000000000000000000000000003F3428FF3F3428FF3F3428FF3F34 856 28FF000000000000000000000000000000000000000000000000000000000000 857 0000000000003F3428FF3F3428FF00000000776D66FFE5DBD2FFE5DBD2FF776D 858 66FF000000003F3428FF3F3428FF000000000000000000000000000000000000 859 00003F3428FF877D73FFE1D9D1FF574D42FF766C63FFEDE5DDFFEDE5DDFF766C 860 63FF574D42FFE1D9D1FF877D73FF3F3428FF0000000000000000000000003F34 861 28FFB6B0A9FFE1D9D1FFC8BEB4FFE1D9D1FFC8BEB4FFEDE5DDFFEDE5DDFFC8BE 862 B4FFE1D9D1FFC8BEB4FFE1D9D1FFB6B0A9FF3F3428FF00000000000000003F34 863 28FFE1D9D1FFEBE7E2FFE1D9D1FFAEA7A0FFE2DDDAFFB7B1ABFFB7B1ABFFE2DD 864 DAFFAEA7A0FFE1D9D1FFEBE7E2FFE1D9D1FF3F3428FF00000000000000000000 865 000061564CFFE1D9D1FFACA39BFFE4E1DCFFAFA8A4FF695E53FF695E53FFAFA8 866 A4FFE4E1DCFFACA39BFFE1D9D1FF61564CFF0000000000000000463B2FFF3E33 867 28FF61564CFFAFA8A4FFC1BCB6FFAFA8A4FF695E53FFFFFFFFFFFFFFFFFF695E 868 53FFAFA8A4FFC1BCB6FFAFA8A4FF61564CFF3E3328FF463B2FFF897E74FFE8E0 869 D7FFE8E0D7FFB0ACA8FFE8E3DDFF695E53FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 870 FFFF695E53FFE8E3DDFFB0ACA8FFE8E0D7FFE8E0D7FF897E74FF877B70FFFFFF 871 FFFFFFFFFFFFBFBCB8FFD6CDC5FF695E53FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 872 FFFF695E53FFD6CDC5FFBFBCB8FFFFFFFFFFFFFFFFFF877B70FF8E8378FF897D 873 72FF84796CFFD8D5D3FFC9C2B9FFA99C90FF594F45FFFFFFFFFFFFFFFFFF6056 874 4DFFA99C90FFC9C2B9FFD8D5D3FF84796CFF897D72FF8E8378FF000000000000 875 0000696053FFDFDFDEFFDFDFDEFFD1C4BAFF8E8377FF44392EFF44392EFF8E83 876 77FFD1C4BAFFDFDFDEFFDFDFDEFF696053FF0000000000000000000000006960 877 53FFF6F1EEFFBBAC9DFFDFD8D3FFEEEFEFFFEBE7E2FFE3D9D1FFE3D9D1FFEBE7 878 E2FFEEEFEFFFDFD8D3FFBBAC9DFFF6F1EEFF696053FF0000000000000000675D 879 50FFCDC6BFFFF6F1EEFFF8F7F4FFF8F7F4FFFFFFFFFFFCFDFDFFFCFDFDFFFFFF 880 FFFFF8F7F4FFF8F7F4FFF6F1EEFFCDC6BFFF696053FF00000000000000000000 881 0000998F83FFCCC5BEFFF6F1EEFF908377FF908377FFEDE7E0FFEDE7E0FF9083 882 77FF908377FFF6F1EEFFCCC5BEFFA9A096FF0000000000000000000000000000 883 0000000000009C9083FF9C9083FF00000000998D80FFFFFFFFFFFFFFFFFF998D 884 80FF000000009C9083FF9C9083FF000000000000000000000000000000000000 885 000000000000000000000000000000000000A19588FF9C9083FF9C9083FFA195 886 88FF000000000000000000000000000000000000000000000000 887 } 864 888 end 865 889 end -
trunk/Client/Forms/UFormMain.lrt
r46 r49 1 1 TMAINFORM.CAPTION=ChronIS 2 TMAINFORM.LABEL1.CAPTION=Groups:3 TMAINFORM.AOBJECTGROUPDELETE.CAPTION=Delete4 TMAINFORM.AOBJECTGROUPADDGROUP.CAPTION=Add group5 TMAINFORM.AOBJECTGROUPADDOBJECT.CAPTION=Add object6 TMAINFORM.AOBJECTGROUPEDIT.CAPTION=Edit7 TMAINFORM.AOBJECTDELETE.CAPTION=Delete8 TMAINFORM.AOBJECTEDIT.CAPTION=Edit9 2 TMAINFORM.AEXIT.CAPTION=Exit 10 3 TMAINFORM.ATOGGLEFULLSCREEN.CAPTION=Fullscreen mode -
trunk/Client/Forms/UFormMain.pas
r46 r49 23 23 AToggleFullscreen: TAction; 24 24 AExit: TAction; 25 AObjectEdit: TAction;26 AObjectDelete: TAction;27 AObjectGroupEdit: TAction;28 AObjectGroupAddObject: TAction;29 AObjectGroupAddGroup: TAction;30 AObjectGroupDelete: TAction;31 25 ActionListItem: TActionList; 32 26 ImageListActions: TImageList; 33 Label1: TLabel; 34 MainMenu1: TMainMenu; 27 MainMenuMain: TMainMenu; 35 28 MenuItem1: TMenuItem; 36 MenuItem10: TMenuItem;37 29 MenuItem11: TMenuItem; 38 30 MenuItem12: TMenuItem; … … 49 41 MenuItem3: TMenuItem; 50 42 MenuItem4: TMenuItem; 51 MenuItem5: TMenuItem;52 MenuItem6: TMenuItem;53 MenuItem7: TMenuItem;54 MenuItem8: TMenuItem;55 MenuItem9: TMenuItem;56 43 PanelMenu: TPanel; 57 44 PanelData: TPanel; 58 PopupMenuObjectGroup: TPopupMenu;59 PopupMenuObject: TPopupMenu;60 45 PopupMenuItem: TPopupMenu; 61 46 Splitter1: TSplitter; … … 67 52 ToolButton4: TToolButton; 68 53 ToolButton5: TToolButton; 69 TreeView1: TTreeView;70 54 procedure AAboutExecute(Sender: TObject); 71 55 procedure AConnectExecute(Sender: TObject); … … 73 57 procedure AExitExecute(Sender: TObject); 74 58 procedure AImportStructureExecute(Sender: TObject); 75 procedure AObjectEditExecute(Sender: TObject);76 procedure AObjectGroupAddGroupExecute(Sender: TObject);77 procedure AObjectGroupDeleteExecute(Sender: TObject);78 procedure AObjectGroupEditExecute(Sender: TObject);79 59 procedure ASettingsExecute(Sender: TObject); 80 60 procedure AToggleFullscreenExecute(Sender: TObject); … … 83 63 procedure FormDestroy(Sender: TObject); 84 64 procedure FormShow(Sender: TObject); 85 procedure MenuItem17Click(Sender: TObject);86 procedure MenuItem19Click(Sender: TObject);87 procedure TreeView1Change(Sender: TObject; Node: TTreeNode);88 procedure TreeView1DblClick(Sender: TObject);89 65 private 90 66 OriginalBounds: TRect; … … 97 73 MainPanelForm: TItemListForm; 98 74 PersistentForm: TPersistentForm; 99 TreeState: TTreeState;100 75 Report: TReport; 101 76 procedure UpdateInterface; 102 procedure LoadTree;103 77 end; 104 78 … … 119 93 UFormItemView, UFormItemEdit, UFormItemAdd, UFormLogin, UFormSetting, UApplicationInfo, 120 94 UCore, UFormImportStructure, UFormAbout, UFormLoginProfile, UChronisClientDirect, 121 UChronisClient, UChronisClientMySQL, UChronisClientXMLRPC ;95 UChronisClient, UChronisClientMySQL, UChronisClientXMLRPC, UFormMenu; 122 96 123 97 {$R *.lfm} … … 158 132 MainPanelForm.ManualDock(PanelData, nil, alClient); 159 133 MainPanelForm.Align := alClient; 134 FormMenu.ManualDock(PanelMenu, nil, alClient); 135 FormMenu.Align := alClient; 136 FormMenu.Show; 160 137 end; 161 138 … … 181 158 procedure TMainForm.FormCreate(Sender: TObject); 182 159 begin 183 TreeState := TTreeState.Create;184 160 Report := TReport.Create; 185 161 Report.Base := Core.System; … … 192 168 FreeAndNil(MainPanelForm); 193 169 FreeAndNil(Report); 194 FreeAndNil(TreeState);195 170 FreeAndNil(PersistentForm); 196 171 end; … … 201 176 PersistentForm.Save(Self); 202 177 SaveToRegistry; 203 end;204 205 procedure TMainForm.AObjectEditExecute(Sender: TObject);206 begin207 (* if Assigned(TreeView1.Selected) then begin208 SelectedObjectId := 9;209 SelectedItem := Integer(TreeView1.Selected.Data);210 ItemEditForm.Show;211 end;*)212 end;213 214 procedure TMainForm.AObjectGroupAddGroupExecute(Sender: TObject);215 begin216 217 end;218 219 procedure TMainForm.AObjectGroupDeleteExecute(Sender: TObject);220 begin221 222 end;223 224 procedure TMainForm.AObjectGroupEditExecute(Sender: TObject);225 begin226 (* if Assigned(TreeView1.Selected) then begin227 SelectedObjectId := 8;228 SelectedItem := Integer(TreeView1.Selected.Data);229 ItemEditForm.Show;230 end;*)231 178 end; 232 179 … … 302 249 try 303 250 Core.System.Active := True; 304 LoadTree;251 FormMenu.LoadTree; 305 252 except 306 253 on E: Exception do ShowMessage(E.Message); … … 318 265 if Core.System.Active then begin 319 266 Core.System.Active := False; 320 TreeView1.Items.Clear;267 FormMenu.TreeViewMenu.Items.Clear; 321 268 end; 322 269 UpdateInterface; … … 341 288 end; 342 289 343 procedure TMainForm.MenuItem17Click(Sender: TObject);344 begin345 try346 LoginForm := TLoginForm.Create(MainForm);347 LoginForm.ShowModal;348 finally349 LoginForm.Free;350 end;351 end;352 353 procedure TMainForm.MenuItem19Click(Sender: TObject);354 begin355 356 end;357 358 procedure TMainForm.TreeView1Change(Sender: TObject; Node: TTreeNode);359 begin360 AObjectGroupDelete.Enabled := Assigned(TreeView1.Selected);361 AObjectGroupEdit.Enabled := Assigned(TreeView1.Selected);362 if Assigned(TreeView1.Selected) then begin363 if TreeView1.Selected.ImageIndex = 0 then begin364 TreeView1.PopupMenu := PopupMenuObjectGroup;365 PanelData.Visible := False;366 end;367 if TreeView1.Selected.ImageIndex = 1 then begin368 TreeView1.PopupMenu := PopupMenuObject;369 //LoadItemList;370 end;371 end;372 end;373 374 procedure TMainForm.TreeView1DblClick(Sender: TObject);375 begin376 if Assigned(TreeView1.Selected) then begin377 MainPanelForm.SelectedObject.Load(Integer(TreeView1.Selected.Data));378 MainPanelForm.Caption := MainPanelForm.SelectedObject.Name;379 MainPanelForm.Show;380 MainPanelForm.Reload;381 UpdateInterface;382 end;383 end;384 385 procedure TMainForm.LoadTree;386 var387 Groups: TListProxy;388 Obj: TObjectProxy;389 Objects: TListProxy;390 Obj2: TObjectProxy;391 I: Integer;392 O: Integer;393 NewNode: TTreeNode;394 NewObjectNode: TTreeNode;395 begin396 with TreeView1, Items do begin397 TreeState.SaveTree(TreeView1);398 Clear;399 AddChild(nil, SGroup);400 TopItem.ImageIndex := 0;401 TopItem.SelectedIndex := 0;402 try403 Groups := TListProxy.Create;404 Groups.Client := Core.System.Client;405 Groups.ObjectName := ObjectGroupTable;406 Groups.SchemaName := Core.System.Client.Schema;407 Groups.Load;408 for I := 0 to Groups.Objects.Count - 1 do begin409 Obj := TObjectProxy(Groups.Objects[I]);410 NewNode := AddChild(TopItem, Obj.Properties.Values['Name']);411 NewNode.ImageIndex := 0;412 NewNode.SelectedIndex := 0;413 NewNode.Data := Pointer(StrToInt(Obj.Properties.Values['Id']));414 try415 Objects := TListProxy.Create;416 Objects.Client := Core.System.Client;417 Objects.ObjectName := ObjectTable;418 Objects.SchemaName := Core.System.Client.Schema;419 Objects.Condition := '`Group`="' + Obj.Properties.Values['Id'] + '"';420 Objects.Load;421 for O := 0 to Objects.Objects.Count - 1 do begin422 Obj2 := TObjectProxy(Objects.Objects[O]);423 NewObjectNode := AddChild(NewNode, Obj2.Properties.Values['Name']);424 NewObjectNode.Data := Pointer(StrToInt(Obj2.Properties.Values['Id']));425 NewObjectNode.ImageIndex := 1;426 NewObjectNode.SelectedIndex := 1;427 end;428 finally429 Objects.Free;430 end;431 end;432 TopItem.Expand(True);433 finally434 Groups.Free;435 end;436 TreeState.LoadTree(TreeView1);437 end;438 end;439 440 290 end. 441 291
Note:
See TracChangeset
for help on using the changeset viewer.