Example #1
0
 public MiscRectangle(Board board, Rectangle rect)
     : base(board, rect)
 {
     PointA = new MiscDot(this, board, rect.Left, rect.Top, false);
     PointB = new MiscDot(this, board, rect.Right, rect.Top, false);
     PointC = new MiscDot(this, board, rect.Right, rect.Bottom, false);
     PointD = new MiscDot(this, board, rect.Left, rect.Bottom, false);
     board.BoardItems.ToolTipDots.Add((ToolTipDot)PointA);
     board.BoardItems.ToolTipDots.Add((ToolTipDot)PointB);
     board.BoardItems.ToolTipDots.Add((ToolTipDot)PointC);
     board.BoardItems.ToolTipDots.Add((ToolTipDot)PointD);
     LineAB       = new MiscLine(board, PointA, PointB);
     LineBC       = new MiscLine(board, PointB, PointC);
     LineCD       = new MiscLine(board, PointC, PointD);
     LineDA       = new MiscLine(board, PointD, PointA);
     LineAB.yBind = true;
     LineBC.xBind = true;
     LineCD.yBind = true;
     LineDA.xBind = true;
 }
Example #2
0
 public MiscRectangle(Board board, Rectangle rect)
     : base(board, rect)
 {
     PointA = new MiscDot(this, board, rect.Left, rect.Top, false);
     PointB = new MiscDot(this, board, rect.Right, rect.Top, false);
     PointC = new MiscDot(this, board, rect.Right, rect.Bottom, false);
     PointD = new MiscDot(this, board, rect.Left, rect.Bottom, false);
     board.BoardItems.ToolTipDots.Add((ToolTipDot)PointA);
     board.BoardItems.ToolTipDots.Add((ToolTipDot)PointB);
     board.BoardItems.ToolTipDots.Add((ToolTipDot)PointC);
     board.BoardItems.ToolTipDots.Add((ToolTipDot)PointD);
     LineAB = new MiscLine(board, PointA, PointB);
     LineBC = new MiscLine(board, PointB, PointC);
     LineCD = new MiscLine(board, PointC, PointD);
     LineDA = new MiscLine(board, PointD, PointA);
     LineAB.yBind = true;
     LineBC.xBind = true;
     LineCD.yBind = true;
     LineDA.xBind = true;
 }