Esempio n. 1
0
 public ASPropertiesUnfoldedBeam()
     : base(outputName)
 {
     InPorts.Clear();
     OutPorts.Clear();
     RegisterAllPorts();
 }
Esempio n. 2
0
        private void UpdatePorts()
        {
            var guids = InPorts.Select(x => x.GUID).ToArray();

            InPorts.Clear();
            for (int input = 0; input < InputCount; input++)
            {
                var name = $"Port {input + 1}";
                var pm   = new PortModel(PortType.Input, this, new PortData(name, ""));
                InPorts.Add(pm);
                if (guids.Length == InputCount)
                {
                    pm.GUID = guids[input];
                }
            }

            guids = OutPorts.Select(x => x.GUID).ToArray();
            OutPorts.Clear();
            for (int output = 0; output < OutputCount; output++)
            {
                var name = $"Port {output + 1}";
                var pm   = new PortModel(PortType.Output, this, new PortData(name, ""));
                OutPorts.Add(pm);
                if (guids.Length == OutputCount)
                {
                    pm.GUID = guids[output];
                }
            }

            RegisterAllPorts();
        }
Esempio n. 3
0
 public BeamRefAxisType()
     : base(outputName)
 {
     InPorts.Clear();
     OutPorts.Clear();
     RegisterAllPorts();
 }
Esempio n. 4
0
 public AnchorOrientationType()
     : base(outputName)
 {
     InPorts.Clear();
     OutPorts.Clear();
     RegisterAllPorts();
 }
Esempio n. 5
0
 public ASPropertiesStraightBeam()
     : base(outputName)
 {
     InPorts.Clear();
     OutPorts.Clear();
     RegisterAllPorts();
 }
Esempio n. 6
0
 public ASPropertiesIsolatedFooting()
     : base(outputName)
 {
     InPorts.Clear();
     OutPorts.Clear();
     RegisterAllPorts();
 }
Esempio n. 7
0
 public ASSelectObjecTypes()
     : base(outputName)
 {
     InPorts.Clear();
     OutPorts.Clear();
     RegisterAllPorts();
 }
Esempio n. 8
0
 public PlateFilletVertexType()
     : base(outputName)
 {
     InPorts.Clear();
     OutPorts.Clear();
     RegisterAllPorts();
 }
Esempio n. 9
0
 //AdvanceSteel.Nodes.Properties
 public CircleScrewBoltPattern()
     : base(outputName)
 {
     InPorts.Clear();
     OutPorts.Clear();
     RegisterAllPorts();
 }
Esempio n. 10
0
 public SlotDirection()
     : base(outputName)
 {
     InPorts.Clear();
     OutPorts.Clear();
     RegisterAllPorts();
 }
Esempio n. 11
0
 public WeldConnectionType()
     : base(outputName)
 {
     InPorts.Clear();
     OutPorts.Clear();
     RegisterAllPorts();
 }
Esempio n. 12
0
 public ASPropertiesBeamCutPlaneFeatures()
     : base(outputName)
 {
     InPorts.Clear();
     OutPorts.Clear();
     RegisterAllPorts();
 }
Esempio n. 13
0
 public ASPropertiesPlatePolylineNotchFeatures()
     : base(outputName)
 {
     InPorts.Clear();
     OutPorts.Clear();
     RegisterAllPorts();
 }
Esempio n. 14
0
 public HoleType()
     : base(outputName)
 {
     InPorts.Clear();
     OutPorts.Clear();
     RegisterAllPorts();
 }
Esempio n. 15
0
 public BodyResolution()
     : base(outputName)
 {
     InPorts.Clear();
     OutPorts.Clear();
     RegisterAllPorts();
 }
Esempio n. 16
0
 //AdvanceSteel.Nodes.Properties
 public ASPropertiesBolts()
     : base(outputName)
 {
     InPorts.Clear();
     OutPorts.Clear();
     RegisterAllPorts();
 }
Esempio n. 17
0
 public ASPropertiesPlateVertexFeatures()
     : base(outputName)
 {
     InPorts.Clear();
     OutPorts.Clear();
     RegisterAllPorts();
 }
Esempio n. 18
0
        private void outports_collectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            //The visual height of the node is bound to preferred height.
            //PreferredHeight = Math.Max(inPorts.Count * 20 + 10, outPorts.Count * 20 + 10); //spacing for inputs + title space + bottom space

            if (e.Action == NotifyCollectionChangedAction.Add)
            {
                //create a new port view model
                foreach (var item in e.NewItems)
                {
                    PortViewModel outportViewModel = SubscribePortEvents(item as PortModel);
                    OutPorts.Add(outportViewModel);
                }
            }
            else if (e.Action == NotifyCollectionChangedAction.Remove)
            {
                //remove the port view model whose model item is the
                //one passed in
                foreach (var item in e.OldItems)
                {
                    PortViewModel portToRemove = UnSubscribePortEvents(OutPorts.ToList().First(x => x.PortModel == item));
                    OutPorts.Remove(portToRemove);
                }
            }
            else if (e.Action == NotifyCollectionChangedAction.Reset)
            {
                foreach (var p in OutPorts)
                {
                    UnSubscribePortEvents(p);
                }
                OutPorts.Clear();
            }
        }
Esempio n. 19
0
        /// <summary>
        /// Initializes ports with default information when the function is unresolved.
        /// </summary>
        /// <param name="inputs">The input nodes for tis function node.</param>
        /// <param name="outputs">The output nodes for tis function node.</param>
        public void UpdatePortsForUnresolved(PortModel[] inputs, PortModel[] outputs)
        {
            InPorts.Clear();
            for (int input = 0; input < inputs.Length; input++)
            {
                InPorts.Add(new PortModel(PortType.Input, this, new PortData(inputs[input].Name, inputs[input].ToolTip)));
            }

            OutPorts.Clear();
            for (int output = 0; output < outputs.Length; output++)
            {
                OutPorts.Add(new PortModel(PortType.Output, this, new PortData(outputs[output].Name, outputs[output].ToolTip)));
            }

            RegisterAllPorts();
        }
Esempio n. 20
0
        private void UpdatePorts()
        {
            InPorts.Clear();
            for (int input = 0; input < InputCount; input++)
            {
                var name = string.Format("Port {0}", input + 1);
                InPorts.Add(new PortModel(PortType.Input, this, new PortData(name, "")));
            }

            OutPorts.Clear();
            for (int output = 0; output < OutputCount; output++)
            {
                var name = string.Format("Port {0}", output + 1);
                OutPorts.Add(new PortModel(PortType.Output, this, new PortData(name, "")));
            }

            RegisterAllPorts();
        }