IsVisibleText() статический приватный Метод

static private IsVisibleText ( string text ) : bool
text string
Результат bool
Пример #1
0
        public static Size DrawHelpTip(Control control, Graphics graphics, Font font, string countMessage, string basicDescription, string documentation)
        {
            object obj;
            object obj1;

            if (!TipPainterTools.IsVisibleText(countMessage) && !TipPainterTools.IsVisibleText(basicDescription) && !TipPainterTools.IsVisibleText(documentation))
            {
                return(Size.Empty);
            }
            CountTipText countTipText = new CountTipText(graphics, font, countMessage);
            Graphics     graphic      = graphics;

            if (TipPainterTools.IsVisibleText(countMessage))
            {
                obj = 4;
            }
            else
            {
                obj = null;
            }
            TipSpacer tipSpacer = new TipSpacer(graphic, new SizeF((float)obj, 0f));
            TipText   tipText   = new TipText(graphics, font, basicDescription);
            Graphics  graphic1  = graphics;

            if (TipPainterTools.IsVisibleText(documentation))
            {
                obj1 = 4;
            }
            else
            {
                obj1 = null;
            }
            TipSpacer tipSpacer1 = new TipSpacer(graphic1, new SizeF(0f, (float)obj1));
            TipText   tipText1   = new TipText(graphics, font, documentation);

            TipSection[] tipSectionArray = new TipSection[] { tipText, tipSpacer1 };
            TipSplitter  tipSplitter     = new TipSplitter(graphics, false, tipSectionArray);

            TipSection[] tipSectionArray1 = new TipSection[] { countTipText, tipSpacer, tipSplitter };
            TipSplitter  tipSplitter1     = new TipSplitter(graphics, true, tipSectionArray1);

            TipSection[] tipSectionArray2 = new TipSection[] { tipSplitter1, tipText1 };
            TipSplitter  tipSplitter2     = new TipSplitter(graphics, false, tipSectionArray2);
            Size         size             = TipPainter.DrawTip(control, graphics, tipSplitter2);

            TipPainterTools.DrawingRectangle1 = countTipText.DrawingRectangle1;
            TipPainterTools.DrawingRectangle2 = countTipText.DrawingRectangle2;
            return(size);
        }
Пример #2
0
        public static Size DrawFixedWidthHelpTipFromCombinedDescription(Control control, Graphics graphics, Font font, string countMessage, string description)
        {
            string str  = null;
            string str1 = null;

            if (TipPainterTools.IsVisibleText(description))
            {
                char[]   chrArray  = new char[] { '\n' };
                string[] strArrays = description.Split(chrArray, 2);
                if ((int)strArrays.Length > 0)
                {
                    str = strArrays[0];
                    if ((int)strArrays.Length > 1)
                    {
                        str1 = strArrays[1].Trim();
                    }
                }
            }
            return(TipPainterTools.DrawFixedWidthHelpTip(control, graphics, font, countMessage, str, str1));
        }