public PointF GetEndPoint() { StateItem to = (StateItem)this.to; if (this.nails.Count == 0) { StateItem from = (StateItem)this.from; return GraphUltility.FindPointByDistance(to.Center(), from.Center(), StateItem.R + 2); } return GraphUltility.FindPointByDistance(to.Center(), this.nails[this.nails.Count - 1].Center(), StateItem.R + 2); }
public PointF GetStartingPoint() { StateItem from = (StateItem)this.from; if (this.nails.Count == 0) { StateItem to = (StateItem)this.to; return(GraphUltility.FindPointByDistance(from.Center(), to.Center(), StateItem.R + 2)); } return(GraphUltility.FindPointByDistance(from.Center(), this.nails[0].Center(), StateItem.R + 2)); }