コード例 #1
0
        protected void AddParameter(Fitter fitter)
        {
            if (fitter == null)
            {
                throw new ArgumentNullException("fitter", "Can't add a parameter without providing a fitter.");
            }

            BlockSlot parameter = new BlockSlot(fitter);

            AddParameter(parameter);
        }
コード例 #2
0
        protected void AddParameter(BlockSlot parameter)
        {
            if (parameter == null)
            {
                throw new ArgumentNullException("parameter", "Can't add a null parameter.");
            }

            parameter.Changed += delegate {
                OnChanged(new EventArgs());
            };

            mainPanel.Children.Add(parameter);
        }
コード例 #3
0
        public List <BlockSlot> GetSlots()
        {
            List <BlockSlot> slots = new List <BlockSlot>(2);

            foreach (UIElement element in mainPanel.Children)
            {
                BlockSlot slot = element as BlockSlot;
                if (slot != null)
                {
                    slots.Add(slot);
                }
            }
            return(slots);
        }