public ReturnIcon(RaisDataType dataType) { Location = new Point(300, 300); SaveLocation(); this.Size = new Size(32, 32); System.Drawing.ToolboxBitmapAttribute tba = TypeDescriptor.GetAttributes(this.GetType())[typeof(System.Drawing.ToolboxBitmapAttribute)] as System.Drawing.ToolboxBitmapAttribute; if (tba != null) { bmp = (System.Drawing.Bitmap)tba.GetImage(this.GetType()); } MathNodeRoot root = new MathNodeRoot(); root.IsVariableHolder = true; var = new MathNodeVariableDummy(root); root[0] = var; if (dataType != null) { var.VariableType = dataType; var.TypeDefined = true; } LinkLineNodeInPort port = new LinkLineNodeInPort(var); port.ClearLine(); port.SetPrevious(null); port.Owner = this; port.HideLabel(); var.InPort = port; port.Owner = this; port.Label.Visible = false; port.Location = new Point(this.Left + this.Width / 2 - port.Width / 2, this.Top - port.Height); port.SaveLocation(); }
public void SetVar(MathNodeVariableDummy v) { var = v; if (var.InPort != null) { var.InPort.Owner = this; } }