/// <summary> /// Creates a ListViewItem from a RhinoPageView /// </summary> private ListViewItem PageViewItem(RhinoPageView view, bool active) { if (null == view) { return(null); } var detail_count = 0; var details = view.GetDetailViews(); if (null != details) { detail_count = view.GetDetailViews().Length; } var arr = new string[3]; arr[0] = view.PageName; arr[1] = $"{view.PageWidth} x {view.PageHeight}"; arr[2] = $"{detail_count}"; var item = new ListViewItem(arr) { ImageIndex = 0, Tag = view.RuntimeSerialNumber }; if (active) { item.Font = m_font_bold; item.Selected = true; } return(item); }
/// <summary> /// Finds the active detail object of a page view /// </summary> protected DetailViewObject FindActiveDetailObject(RhinoPageView pageView) { if (null == pageView || pageView.PageIsActive) { return(null); } var details = pageView.GetDetailViews(); if (null == details) { return(null); } foreach (var detail in details) { if (detail.IsActive) { return(detail); } } return(null); }