/// <summary> /// User clicked another item in the LOGICAL tree, show the details /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void treeListViewLogical_SelectionChanged(object sender, EventArgs e) { MXFLogicalObject lobj = this.treeListViewLogical.SelectedObject as MXFLogicalObject; if (lobj != null) { MXFObject obj = lobj.Object; if (obj != null) { if (!m_fDoNotSelectOther) { this.propGrid.SelectedObject = obj; // Try to select this item in the main list as well m_fDoNotSelectOther = true; SelectObjectInMainList(obj); m_fDoNotSelectOther = false; // Display the hex data ReadData(obj); } } this.btnNext.Enabled = this.btnPrevious.Enabled = (obj != null); } }
/// <summary> /// Get the childs! /// </summary> /// <param name="x"></param> /// <returns></returns> private IEnumerable Tree_LogicalChildGetter(object x) { MXFLogicalObject mxf = x as MXFLogicalObject; if (mxf == null) { return(null); } return(mxf.Children.ToArray()); }
/// <summary> /// Does this object have children? /// </summary> /// <param name="x"></param> /// <returns></returns> private bool Tree_HasLogicalChildren(object x) { MXFLogicalObject mxf = x as MXFLogicalObject; if (mxf == null) { return(false); } return(mxf.HasChildren); }