public PlateFilletVertexType() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
//AdvanceSteel.Nodes.Properties public CircleScrewBoltPattern() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public ASPropertiesIsolatedFooting() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public SlotDirection() : 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 BodyResolution() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public HoleType() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public ASPropertiesPlateVertexFeatures() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
//AdvanceSteel.Nodes.Properties public ASPropertiesBolts() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public WeldConnectionType() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
private void inports_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 inportViewModel = SubscribePortEvents(item as PortModel); InPorts.Add(inportViewModel); } } 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(InPorts.ToList().First(x => x.PortModel == item));; InPorts.Remove(portToRemove); portToRemove.Dispose(); } } else if (e.Action == NotifyCollectionChangedAction.Reset) { foreach (var p in InPorts) { UnSubscribePortEvents(p); p.Dispose(); } InPorts.Clear(); } }
public BeamRefAxisType() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
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 ASPropertiesStraightBeam() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public AnchorOrientationType() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
public ASSelectObjecTypes() : base(outputName) { InPorts.Clear(); OutPorts.Clear(); RegisterAllPorts(); }
/// <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(); }
private Range(IEnumerable <PortModel> inPorts, IEnumerable <PortModel> outPorts) : base(inPorts, outPorts) { if (inPorts.Count() == 3) { inPorts.ElementAt(0).DefaultValue = startPortDefaultValue; inPorts.ElementAt(1).DefaultValue = endPortDefaultValue; inPorts.ElementAt(2).DefaultValue = stepPortDefaultValue; } else { // If information from json does not look correct, clear the default ports and add ones with default value InPorts.Clear(); InPorts.Add(new PortModel(PortType.Input, this, new PortData("start", Resources.RangePortDataStartToolTip, startPortDefaultValue))); InPorts.Add(new PortModel(PortType.Input, this, new PortData("end", Resources.RangePortDataEndToolTip, endPortDefaultValue))); InPorts.Add(new PortModel(PortType.Input, this, new PortData("step", Resources.RangePortDataStepToolTip, stepPortDefaultValue))); } if (outPorts.Count() == 0) { OutPorts.Add(new PortModel(PortType.Output, this, new PortData("seq", Resources.RangePortDataSeqToolTip))); } ArgumentLacing = LacingStrategy.Auto; SetNodeStateBasedOnConnectionAndDefaults(); }
private void ProcessFormula() { Expression e; try { e = new Expression( FormulaString.ToLower() .Replace(" and ", "+").Replace("&&", "+") .Replace(" or ", "+").Replace("||", "+"), EvaluateOptions.IgnoreCase); } catch (Exception ex) { Error(ex.Message); return; } if (e.HasErrors()) { Error(e.Error); return; } var parameters = new List <string>(); var paramSet = new HashSet <string>(); e.EvaluateParameter += delegate(string name, ParameterArgs args) { if (!paramSet.Contains(name) && !reservedParamNames.Contains(name)) { paramSet.Add(name); parameters.Add(name); } args.Result = 0; }; e.EvaluateFunction += delegate(string name, FunctionArgs args) { foreach (var p in args.Parameters) { p.Evaluate(); } args.Result = 0; }; try { e.Evaluate(); } catch { } InPorts.Clear(); foreach (var p in parameters) { InPorts.Add(new PortModel(PortType.Input, this, new PortData(p, "variable"))); } ClearRuntimeError(); }