public Coordinate() { CustomRectangle = new CustomRectangle(); var temp = CustomRectangle.Clone() as CustomRectangle; AllMoves.Add(temp); }
public object Clone() { var temp = new CustomRectangle(); temp.LeftTopCorner = new Point(LeftTopCorner.X, LeftTopCorner.Y); temp.RightTopCorner = new Point(RightTopCorner.X, RightTopCorner.Y); temp.LeftBottomCorner = new Point(LeftBottomCorner.X, LeftBottomCorner.Y); temp.RightBottomCorner = new Point(RightBottomCorner.X, RightBottomCorner.Y); temp.PointList = new List <Point>() { temp.LeftTopCorner, temp.RightTopCorner, temp.LeftBottomCorner, temp.RightBottomCorner }; return(temp); }