private void ChangePanelContext() { if (this.panel1.Controls.Count > 0) { object _obj = this.panel1.Controls[0]; if (_obj is IControlMenu) { IControlMenu _ic = _obj as IControlMenu; _ic.CloseControl(); } } }
private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e) { CurrentNode = e.Node; if (CurrentItem != null) { CurrentItem.CloseControl(); } if (e.Node != null) { ShowNodeItem(e.Node); } else { this.panel1.Controls.Clear(); CurrentItem = null; } RaiseMenuChanged(); }