public Origin(Shape shape) { SuspendEvents = true; Shape = shape; AllowMove = true; SuspendEvents = false; }
public Link(Shape start,Shape end) : base(start,end) { SuspendEvents = true; End.Marker = new Arrow(false); SuspendEvents = false; }
public ComplexLine(Shape start,Shape end): base(start,end) { mSegments = new Segments(); Segment segment = new Segment(Start,End); Segments.Add(segment); segment.SegmentInvalid += new EventHandler(segment_SegmentInvalid); AllowExpand = true; }
public Connector(Shape start,Shape end) : base(start,end) { SuspendEvents = true; Avoid = true; Padding = new SizeF(20,20); SmoothingMode = SmoothingMode.None; SuspendEvents = false; }
public Line(Shape start,Shape end) { SuspendEvents = true; AllowMove = true; DrawSelected = true; Start = new Origin(start); End = new Origin(end); Interaction = UserInteraction.BringToFront; Ports = new Elements(typeof(Port),"Port"); SuspendEvents = false; }
public virtual Connector AddConnector(string key, Port start, Shape end) { Connector line = Runtime.CreateConnector(); line.Start.Port = start; line.End.Shape = end; Runtime.ActiveContainer.Lines.Add(key,line); return line; }
public virtual Connector AddConnector(Shape start, Shape end) { Connector line = Runtime.CreateConnector(); line.Start.Shape = start; line.End.Shape = end; Runtime.ActiveContainer.Lines.Add(Runtime.ActiveContainer.Lines.CreateKey(),line); return line; }
public virtual Line AddLine(string key, Shape start, Shape end) { Line line = Runtime.CreateLine(); line.Start.Shape = start; line.End.Shape = end; Runtime.ActiveContainer.Lines.Add(key,line); return line; }
public virtual Shape CreateShape(PointF start,SizeF size) { Shape shape = new Shape(); shape.Location = start; if (! size.IsEmpty) shape.Size = size; OnCreateElement(shape); return shape; }
public virtual Shape CreateShape() { Shape shape = new Shape(); OnCreateElement(shape); return shape; }
public Curve(Shape start,Shape end): base(start,end) { mCurveType = CurveType.Spline; mTension = 0.5F; CreateControlPoints(); }
private void ResetLines(Shape shape) { Suspend(); //Loop through each line and create a remove list foreach (Line line in Lines.Values) { if (line.Start.DockedElement != null && line.Start.DockedElement == shape) line.Start.Location = line.FirstPoint; if (line.End.DockedElement != null && line.End.DockedElement == shape) line.End.Location = line.LastPoint; } Resume(); }
public Shape(Shape prototype): base(prototype) { mAllowMove = prototype.AllowMove; mAllowScale = prototype.AllowScale; mAllowRotate = prototype.AllowRotate; mDrawSelected = prototype.DrawSelected; mDirection = prototype.Direction; mInteraction = prototype.Interaction; mMaximumSize = prototype.MaximumSize; mMinimumSize = prototype.MinimumSize; mKeepAspect = prototype.KeepAspect; //Copy ports Ports = new Elements(typeof(Port),"Port"); 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.Animation != null) mAnimation = (Animation) prototype.Animation.Clone(); }