public ToolTipChar(Board board, Rectangle rect, ToolTip boundTooltip) : base(board, rect) { PointA = new ToolTipDot(this, board, rect.Left, rect.Top, false); PointB = new ToolTipDot(this, board, rect.Right, rect.Top, false); PointC = new ToolTipDot(this, board, rect.Right, rect.Bottom, false); PointD = new ToolTipDot(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 ToolTipLine(board, PointA, PointB); LineBC = new ToolTipLine(board, PointB, PointC); LineCD = new ToolTipLine(board, PointC, PointD); LineDA = new ToolTipLine(board, PointD, PointA); LineAB.yBind = true; LineBC.xBind = true; LineCD.yBind = true; LineDA.xBind = true; BoundTooltip = boundTooltip; }
public ToolTip(Board board, Rectangle rect, string title, string desc) : base(board, rect) { PointA = new ToolTipDot(this, board, rect.Left, rect.Top, false); PointB = new ToolTipDot(this, board, rect.Right, rect.Top, false); PointC = new ToolTipDot(this, board, rect.Right, rect.Bottom, false); PointD = new ToolTipDot(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 ToolTipLine(board, PointA, PointB); LineBC = new ToolTipLine(board, PointB, PointC); LineCD = new ToolTipLine(board, PointC, PointD); LineDA = new ToolTipLine(board, PointD, PointA); LineAB.yBind = true; LineBC.xBind = true; LineCD.yBind = true; LineDA.xBind = true; this.title = title; this.desc = desc; }