public ASPropertiesUnfoldedBeam() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
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(); }
public BeamRefAxisType() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public AnchorOrientationType() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public ASPropertiesStraightBeam() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public ASPropertiesIsolatedFooting() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public ASSelectObjecTypes() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public PlateFilletVertexType() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
//AdvanceSteel.Nodes.Properties public CircleScrewBoltPattern() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public SlotDirection() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public WeldConnectionType() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public ASPropertiesBeamCutPlaneFeatures() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public ASPropertiesPlatePolylineNotchFeatures() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public HoleType() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public BodyResolution() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
//AdvanceSteel.Nodes.Properties public ASPropertiesBolts() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public ASPropertiesPlateVertexFeatures() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
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(); } }
/// <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(); }
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(); }