public override object Clone() { AB_LoopActions obj = (AB_LoopActions)base.Clone(); if (_logicExpression != null) { obj.Condition = (MathNodeRoot)_logicExpression.Clone(); } if (_iconList != null) { obj._iconList = new List <ComponentIcon>(); foreach (ComponentIcon c in _iconList) { obj._iconList.Add((ComponentIcon)c.Clone()); } } if (_initAction != null) { obj._initAction = _initAction; } if (_increAction != null) { obj._increAction = _increAction; } return(obj); }
public virtual object Clone() { ExpressionValue ev = (ExpressionValue)Activator.CreateInstance(this.GetType()); if (_exp != null) { ev._exp = (MathNodeRoot)_exp.Clone(); } ev._hasData = _hasData; return(ev); }
public override object Clone() { DrawingVariable clone = (DrawingVariable)base.Clone(); clone.LabelVisible = _labelVisible; if (root != null) { MathNodeRoot r = (MathNodeRoot)root.Clone(); clone.SetDrawingAttributes(r); } return(clone); }
/// <summary> /// /// </summary> /// <param name="MathExpression"></param> /// <param name="x"></param> /// <param name="y"></param> /// <returns></returns> public MathExpViewer AddMathViewer(MathNodeRoot MathExpression, int x, int y) { string name = CreateName(XmlSerialization.XML_Math); IDesignerHost host = (IDesignerHost)dsf.GetService(typeof(IDesignerHost)); MathExpViewer v = (MathExpViewer)host.CreateComponent(typeof(MathExpViewer)); root.Controls.Add(v); v.Visible = true; v.Location = new Point(x, y); // v.LoadData((MathNodeRoot)MathExpression.Clone()); // v.Name = name; v.Site.Name = v.Name; propertyGrid1.SelectedObject = v; root.Refresh(); root.Changed = true; return(v); }
public override object Clone() { Parameter p = (Parameter)base.Clone(); p.Method = this.Method; p.Fixed = Fixed; p.TextFont = TextFont; p.TextColor = TextColor; p.Location = Location; p.TransferLocalService(_localServices); MathNodeRoot r = Variable.MathExpression; MathNodeRoot r0 = (MathNodeRoot)r.Clone(); MathNodeVariable v = r0[0] as MathNodeVariable; p.SetCodeVariable(v); if (_castTo != null) { p.ProgEntity = (ProgramEntity)_castTo.Clone(); } return(p); }