private void ToolStripMenuItemOpenClick(object sender, EventArgs e) { ComponentCollection selected = new ComponentCollection(); foreach (BaseEntityObject o in _directivesViewer.SelectedItems) { if (o is ComponentDirective) { selected.CompareAndAdd(((ComponentDirective)o).ParentComponent); } if (o is Component) { selected.CompareAndAdd((Component)o); } } foreach (Component t in selected) { var refE = new ReferenceEventArgs(); DisplayerParams dp = null; string regNumber = ""; if (t is BaseComponent) { if (((BaseComponent)t).BaseComponentType.ItemId == 4) { regNumber = t.ToString(); } else { dp = ScreenAndFormManager.GetBaseComponentScreen((BaseComponent)t); } } else { dp = ScreenAndFormManager.GetComponentScreen(t); } refE.SetParameters(dp); InvokeDisplayerRequested(refE); } }
private void DetailReferenceDisplayerRequested(object sender, ReferenceEventArgs e) { var dp = ScreenAndFormManager.GetBaseComponentScreen(_currentDirective.ParentBaseComponent); e.SetParameters(dp); }