Changeset 49 for trunk/Client/Forms


Ignore:
Timestamp:
Mar 21, 2012, 12:54:06 PM (13 years ago)
Author:
chronos
Message:
  • Modified: Navigation menu moved to separated docked form.
Location:
trunk/Client/Forms
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Client/Forms/UFormImportStructure.pas

    r46 r49  
    5151
    5252uses
    53   UCore, UFormMain;
     53  UCore, UFormMain, UFormMenu;
    5454
    5555{ TSQLTable }
     
    201201    DbRows.Free;
    202202    Database.Free;
    203     MainForm.LoadTree;
     203    FormMenu.LoadTree;
    204204  end;
    205205end;
  • trunk/Client/Forms/UFormItemEdit.pas

    r46 r49  
    6363
    6464uses
    65   UFormMain, UDataTypes, UCore, UFormItemAdd, UFormItemView;
     65  UFormMain, UDataTypes, UCore, UFormItemAdd, UFormItemView, UFormMenu;
    6666
    6767{$R *.lfm}
     
    143143  if (SelectedObject.Table = ObjectGroupTable) or
    144144  (SelectedObject.Table = ObjectTable) then
    145     MainForm.LoadTree;
     145    FormMenu.LoadTree;
    146146  //MainForm.LoadItemList;
    147147  Close;
  • trunk/Client/Forms/UFormMain.lfm

    r46 r49  
    145145    0000
    146146  }
    147   Menu = MainMenu1
     147  Menu = MainMenuMain
    148148  OnClose = FormClose
    149149  OnCreate = FormCreate
     
    158158    Align = alLeft
    159159    BevelOuter = bvNone
    160     ClientHeight = 381
    161     ClientWidth = 184
    162160    TabOrder = 0
    163     object Label1: TLabel
    164       Left = 7
    165       Height = 14
    166       Top = 4
    167       Width = 39
    168       Caption = 'Groups:'
    169       ParentColor = False
    170     end
    171     object TreeView1: TTreeView
    172       Left = 4
    173       Height = 357
    174       Top = 19
    175       Width = 180
    176       Anchors = [akTop, akLeft, akRight, akBottom]
    177       DefaultItemHeight = 16
    178       Images = ImageListActions
    179       ReadOnly = True
    180       TabOrder = 0
    181       OnChange = TreeView1Change
    182       OnDblClick = TreeView1DblClick
    183       Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
    184     end
    185161  end
    186162  object PanelData: TPanel
     
    256232    left = 360
    257233    top = 120
    258     object AObjectGroupDelete: TAction
    259       Category = 'ObjectGroup'
    260       Caption = 'Delete'
    261       OnExecute = AObjectGroupDeleteExecute
    262     end
    263     object AObjectGroupAddGroup: TAction
    264       Category = 'ObjectGroup'
    265       Caption = 'Add group'
    266       OnExecute = AObjectGroupAddGroupExecute
    267     end
    268     object AObjectGroupAddObject: TAction
    269       Category = 'ObjectGroup'
    270       Caption = 'Add object'
    271     end
    272     object AObjectGroupEdit: TAction
    273       Category = 'ObjectGroup'
    274       Caption = 'Edit'
    275       OnExecute = AObjectGroupEditExecute
    276     end
    277     object AObjectDelete: TAction
    278       Category = 'Object'
    279       Caption = 'Delete'
    280     end
    281     object AObjectEdit: TAction
    282       Category = 'Object'
    283       Caption = 'Edit'
    284       OnExecute = AObjectEditExecute
    285     end
    286234    object AExit: TAction
    287235      Caption = 'Exit'
     
    342290      Caption = 'Add'
    343291      ShortCut = 16449
    344     end
    345   end
    346   object PopupMenuObject: TPopupMenu
    347     Images = ImageListActions
    348     left = 72
    349     top = 136
    350     object MenuItem9: TMenuItem
    351       Action = AObjectDelete
    352     end
    353     object MenuItem10: TMenuItem
    354       Action = AObjectEdit
    355       OnClick = AObjectEditExecute
    356     end
    357   end
    358   object PopupMenuObjectGroup: TPopupMenu
    359     Images = ImageListActions
    360     left = 72
    361     top = 88
    362     object MenuItem5: TMenuItem
    363       Action = AObjectGroupAddGroup
    364       OnClick = AObjectGroupAddGroupExecute
    365     end
    366     object MenuItem7: TMenuItem
    367       Action = AObjectGroupAddObject
    368     end
    369     object MenuItem8: TMenuItem
    370       Action = AObjectGroupEdit
    371       OnClick = AObjectGroupEditExecute
    372     end
    373     object MenuItem6: TMenuItem
    374       Action = AObjectGroupDelete
    375292    end
    376293  end
     
    541458      0000000000000000000000000000000000000000000000000000000000000000
    542459      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
    566463      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
    574491      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
    575492      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     
    766683    }
    767684  end
    768   object MainMenu1: TMainMenu
     685  object MainMenuMain: TMainMenu
    769686    Images = ImageListActions
    770687    left = 456
     
    774691      object MenuItem17: TMenuItem
    775692        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        }
    777729      end
    778730      object MenuItem22: TMenuItem
    779731        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        }
    780768      end
    781769      object MenuItem14: TMenuItem
     
    862850      object MenuItem16: TMenuItem
    863851        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        }
    864888      end
    865889    end
  • trunk/Client/Forms/UFormMain.lrt

    r46 r49  
    11TMAINFORM.CAPTION=ChronIS
    2 TMAINFORM.LABEL1.CAPTION=Groups:
    3 TMAINFORM.AOBJECTGROUPDELETE.CAPTION=Delete
    4 TMAINFORM.AOBJECTGROUPADDGROUP.CAPTION=Add group
    5 TMAINFORM.AOBJECTGROUPADDOBJECT.CAPTION=Add object
    6 TMAINFORM.AOBJECTGROUPEDIT.CAPTION=Edit
    7 TMAINFORM.AOBJECTDELETE.CAPTION=Delete
    8 TMAINFORM.AOBJECTEDIT.CAPTION=Edit
    92TMAINFORM.AEXIT.CAPTION=Exit
    103TMAINFORM.ATOGGLEFULLSCREEN.CAPTION=Fullscreen mode
  • trunk/Client/Forms/UFormMain.pas

    r46 r49  
    2323    AToggleFullscreen: TAction;
    2424    AExit: TAction;
    25     AObjectEdit: TAction;
    26     AObjectDelete: TAction;
    27     AObjectGroupEdit: TAction;
    28     AObjectGroupAddObject: TAction;
    29     AObjectGroupAddGroup: TAction;
    30     AObjectGroupDelete: TAction;
    3125    ActionListItem: TActionList;
    3226    ImageListActions: TImageList;
    33     Label1: TLabel;
    34     MainMenu1: TMainMenu;
     27    MainMenuMain: TMainMenu;
    3528    MenuItem1: TMenuItem;
    36     MenuItem10: TMenuItem;
    3729    MenuItem11: TMenuItem;
    3830    MenuItem12: TMenuItem;
     
    4941    MenuItem3: TMenuItem;
    5042    MenuItem4: TMenuItem;
    51     MenuItem5: TMenuItem;
    52     MenuItem6: TMenuItem;
    53     MenuItem7: TMenuItem;
    54     MenuItem8: TMenuItem;
    55     MenuItem9: TMenuItem;
    5643    PanelMenu: TPanel;
    5744    PanelData: TPanel;
    58     PopupMenuObjectGroup: TPopupMenu;
    59     PopupMenuObject: TPopupMenu;
    6045    PopupMenuItem: TPopupMenu;
    6146    Splitter1: TSplitter;
     
    6752    ToolButton4: TToolButton;
    6853    ToolButton5: TToolButton;
    69     TreeView1: TTreeView;
    7054    procedure AAboutExecute(Sender: TObject);
    7155    procedure AConnectExecute(Sender: TObject);
     
    7357    procedure AExitExecute(Sender: TObject);
    7458    procedure AImportStructureExecute(Sender: TObject);
    75     procedure AObjectEditExecute(Sender: TObject);
    76     procedure AObjectGroupAddGroupExecute(Sender: TObject);
    77     procedure AObjectGroupDeleteExecute(Sender: TObject);
    78     procedure AObjectGroupEditExecute(Sender: TObject);
    7959    procedure ASettingsExecute(Sender: TObject);
    8060    procedure AToggleFullscreenExecute(Sender: TObject);
     
    8363    procedure FormDestroy(Sender: TObject);
    8464    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);
    8965  private
    9066    OriginalBounds: TRect;
     
    9773    MainPanelForm: TItemListForm;
    9874    PersistentForm: TPersistentForm;
    99     TreeState: TTreeState;
    10075    Report: TReport;
    10176    procedure UpdateInterface;
    102     procedure LoadTree;
    10377  end;
    10478
     
    11993  UFormItemView, UFormItemEdit, UFormItemAdd, UFormLogin, UFormSetting, UApplicationInfo,
    12094  UCore, UFormImportStructure, UFormAbout, UFormLoginProfile, UChronisClientDirect,
    121   UChronisClient, UChronisClientMySQL, UChronisClientXMLRPC;
     95  UChronisClient, UChronisClientMySQL, UChronisClientXMLRPC, UFormMenu;
    12296
    12397{$R *.lfm}
     
    158132  MainPanelForm.ManualDock(PanelData, nil, alClient);
    159133  MainPanelForm.Align := alClient;
     134  FormMenu.ManualDock(PanelMenu, nil, alClient);
     135  FormMenu.Align := alClient;
     136  FormMenu.Show;
    160137end;
    161138
     
    181158procedure TMainForm.FormCreate(Sender: TObject);
    182159begin
    183   TreeState := TTreeState.Create;
    184160  Report := TReport.Create;
    185161  Report.Base := Core.System;
     
    192168  FreeAndNil(MainPanelForm);
    193169  FreeAndNil(Report);
    194   FreeAndNil(TreeState);
    195170  FreeAndNil(PersistentForm);
    196171end;
     
    201176  PersistentForm.Save(Self);
    202177  SaveToRegistry;
    203 end;
    204 
    205 procedure TMainForm.AObjectEditExecute(Sender: TObject);
    206 begin
    207 (*  if Assigned(TreeView1.Selected) then begin
    208     SelectedObjectId := 9;
    209     SelectedItem := Integer(TreeView1.Selected.Data);
    210     ItemEditForm.Show;
    211   end;*)
    212 end;
    213 
    214 procedure TMainForm.AObjectGroupAddGroupExecute(Sender: TObject);
    215 begin
    216 
    217 end;
    218 
    219 procedure TMainForm.AObjectGroupDeleteExecute(Sender: TObject);
    220 begin
    221 
    222 end;
    223 
    224 procedure TMainForm.AObjectGroupEditExecute(Sender: TObject);
    225 begin
    226 (*  if Assigned(TreeView1.Selected) then begin
    227     SelectedObjectId := 8;
    228     SelectedItem := Integer(TreeView1.Selected.Data);
    229     ItemEditForm.Show;
    230   end;*)
    231178end;
    232179
     
    302249      try
    303250        Core.System.Active := True;
    304         LoadTree;
     251        FormMenu.LoadTree;
    305252      except
    306253        on E: Exception do ShowMessage(E.Message);
     
    318265  if Core.System.Active then begin
    319266    Core.System.Active := False;
    320     TreeView1.Items.Clear;
     267    FormMenu.TreeViewMenu.Items.Clear;
    321268  end;
    322269  UpdateInterface;
     
    341288end;
    342289
    343 procedure TMainForm.MenuItem17Click(Sender: TObject);
    344 begin
    345   try
    346     LoginForm := TLoginForm.Create(MainForm);
    347     LoginForm.ShowModal;
    348   finally
    349     LoginForm.Free;
    350   end;
    351 end;
    352 
    353 procedure TMainForm.MenuItem19Click(Sender: TObject);
    354 begin
    355 
    356 end;
    357 
    358 procedure TMainForm.TreeView1Change(Sender: TObject; Node: TTreeNode);
    359 begin
    360   AObjectGroupDelete.Enabled := Assigned(TreeView1.Selected);
    361   AObjectGroupEdit.Enabled := Assigned(TreeView1.Selected);
    362   if Assigned(TreeView1.Selected) then begin
    363     if TreeView1.Selected.ImageIndex = 0 then begin
    364       TreeView1.PopupMenu := PopupMenuObjectGroup;
    365       PanelData.Visible := False;
    366     end;
    367     if TreeView1.Selected.ImageIndex = 1 then begin
    368       TreeView1.PopupMenu := PopupMenuObject;
    369       //LoadItemList;
    370     end;
    371   end;
    372 end;
    373 
    374 procedure TMainForm.TreeView1DblClick(Sender: TObject);
    375 begin
    376   if Assigned(TreeView1.Selected) then begin
    377     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 var
    387   Groups: TListProxy;
    388   Obj: TObjectProxy;
    389   Objects: TListProxy;
    390   Obj2: TObjectProxy;
    391   I: Integer;
    392   O: Integer;
    393   NewNode: TTreeNode;
    394   NewObjectNode: TTreeNode;
    395 begin
    396   with TreeView1, Items do begin
    397     TreeState.SaveTree(TreeView1);
    398     Clear;
    399     AddChild(nil, SGroup);
    400     TopItem.ImageIndex := 0;
    401     TopItem.SelectedIndex := 0;
    402     try
    403       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 begin
    409         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         try
    415           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 begin
    422             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         finally
    429           Objects.Free;
    430         end;
    431       end;
    432       TopItem.Expand(True);
    433     finally
    434       Groups.Free;
    435     end;
    436     TreeState.LoadTree(TreeView1);
    437   end;
    438 end;
    439 
    440290end.
    441291
Note: See TracChangeset for help on using the changeset viewer.