コード例 #1
0
 public GH_SwitcherComponentAttributes(GH_SwitcherComponent component)
     : base(component)
 {
     collection         = new GH_MenuCollection();
     composedCollection = new GH_MenuCollection();
     composedCollection.Merge(collection);
     CreateUnitDropDown();
     InitializeUnitParameters();
 }
コード例 #2
0
        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);
            }
        }