public GH_SwitcherComponentAttributes(GH_SwitcherComponent component) : base(component) { collection = new GH_MenuCollection(); composedCollection = new GH_MenuCollection(); composedCollection.Merge(collection); CreateUnitDropDown(); InitializeUnitParameters(); }
private void ComposeMenu() { GH_SwitcherComponent gH_SwitcherComponent = (GH_SwitcherComponent)base.Owner; composedCollection = new GH_MenuCollection(); EvaluationUnit activeUnit = gH_SwitcherComponent.ActiveUnit; if (activeUnit != null && activeUnit.Context.Collection != null) { composedCollection.Merge(gH_SwitcherComponent.ActiveUnit.Context.Collection); } if (collection != null) { composedCollection.Merge(collection); } if (unitMenuCollection != null) { composedCollection.Merge(unitMenuCollection); } }