public static Size DrawHelpTip(Control control, Graphics graphics, Font font, string countMessage, string basicDescription, string documentation) { if (TipPainterTools.IsVisibleText(countMessage) || TipPainterTools.IsVisibleText(basicDescription) || TipPainterTools.IsVisibleText(documentation)) { CountTipText countTipText = new CountTipText(graphics, font, countMessage); TipSpacer tipSpacer = new TipSpacer(graphics, new SizeF((float)(TipPainterTools.IsVisibleText(countMessage) ? 4 : 0), 0f)); TipText tipText = new TipText(graphics, font, basicDescription); TipSpacer tipSpacer2 = new TipSpacer(graphics, new SizeF(0f, (float)(TipPainterTools.IsVisibleText(documentation) ? 4 : 0))); TipText tipText2 = new TipText(graphics, font, documentation); TipSplitter tipSplitter = new TipSplitter(graphics, false, new TipSection[] { tipText, tipSpacer2 }); TipSplitter tipSplitter2 = new TipSplitter(graphics, true, new TipSection[] { countTipText, tipSpacer, tipSplitter }); TipSplitter tipData = new TipSplitter(graphics, false, new TipSection[] { tipSplitter2, tipText2 }); Size result = TipPainter.DrawTip(control, graphics, tipData); TipPainterTools.DrawingRectangle1 = countTipText.DrawingRectangle1; TipPainterTools.DrawingRectangle2 = countTipText.DrawingRectangle2; return(result); } return(Size.Empty); }
protected StringFormat GetInternalStringFormat() { if (this.tipFormat == null) { this.tipFormat = TipText.CreateTipStringFormat(this.horzAlign, this.vertAlign); } return(this.tipFormat); }