public Shape(StencilItem stencil) { AllowMove = true; AllowScale = true; AllowRotate = false; DrawSelected = true; Direction = Direction.Both; Interaction = UserInteraction.BringToFront; MinimumSize = new SizeF(32, 32); MaximumSize = new SizeF(320, 320); //Set up stencil StencilItem = stencil; stencil.CopyTo(this); Ports = new Ports(Model); }
public Link(Link prototype) { AllowMove = prototype.AllowMove; LineJoin = prototype.LineJoin; DrawSelected = prototype.DrawSelected; Interaction = prototype.Interaction; //Set up new origins Start = new Origin(prototype.FirstPoint); End = new Origin(prototype.LastPoint); Start.Marker = prototype.Start.Marker; End.Marker = prototype.End.Marker; List <PointF> points = new List <PointF>(); points.AddRange(prototype.Points); SetPoints(points); //Copy ports Ports = new Ports(Model); foreach (Port port in prototype.Ports.Values) { Port clone = (Port)port.Clone(); Ports.Add(port.Key, clone); clone.SuspendValidation(); clone.Location = port.Location; clone.ResumeValidation(); } if (prototype.Label != null) { Label = (Label)prototype.Label.Clone(); } if (prototype.Image != null) { Image = (Image)prototype.Image.Clone(); } DrawPath(); }
public Link(Port start, Port end) : base() { Start = new Origin(start); End = new Origin(end); Ports = new Ports(Model); }
public Link(Shape start, Shape end) : base() { Start = new Origin(start); End = new Origin(end); Ports = new Ports(Model); }
public Link(Origin start, Origin end) : base() { Start = start; End = end; Ports = new Ports(Model); }
//Constructors public Link() : base() { Start = new Origin(); End = new Origin(); Ports = new Ports(Model); }