Exemplo n.º 1
0
        //----------------------------------------------------------------------
        /// <summary>
        /// Change font detail for an item in the trace
        /// </summary>
        /// <param name="colId">Column index : All columns=-1, Col1=0, Col2=1, Col3=2</param>
        /// <param name="bold">Change font to bold</param>
        /// <param name="italic">Change font to Italic</param>
        /// <param name="color">Change Color. To reduce the number assembly reference, the Color structure is not used. Use YourColor.ToArgb() instead. Use -1 to keep default color</param>
        /// <param name="size">Change font size, use zero to keep normal size</param>
        /// <param name="fontName">Change font name</param>
        /// <returns>The TMember node</returns>
        public TMemberNode SetFontDetail(int colId, bool bold, bool italic, int color, int size, string fontName)
        {
            FontDetail fontDetail = new FontDetail();

            fontDetail.ColId    = colId;
            fontDetail.Bold     = bold;
            fontDetail.Italic   = italic;
            fontDetail.Color    = color;
            fontDetail.Size     = size;
            fontDetail.FontName = fontName;

            if (FontDetails == null)
            {
                FontDetails = new FontDetailList();
            }

            FontDetails.Add(fontDetail);
            return(this);
        }
Exemplo n.º 2
0
        //----------------------------------------------------------------------
        /// <summary>
        /// Change font detail for an item in the trace
        /// </summary>
        /// <param name="colId">Column index : All columns=-1, Col1=0, Col2=1, Col3=2</param>
        /// <param name="bold">Change font to bold</param>
        /// <param name="italic">Change font to Italic</param>
        /// <param name="color">Change Color. To reduce the number assembly reference, the Color structure is not used. Use YourColor.ToArgb() instead. Use -1 to keep default color</param>
        /// <param name="size">Change font size, use zero to keep normal size</param>
        /// <param name="fontName">Change font name</param>
        /// <returns>The TMember node</returns>
        public TMemberNode SetFontDetail(int colId, bool bold, bool italic, int color, int size, string fontName)
        {
            FontDetail fontDetail = new FontDetail
            {
                ColId    = colId,
                Bold     = bold,
                Italic   = italic,
                Color    = color,
                Size     = size,
                FontName = fontName
            };

            if (FontDetails == null)
            {
                FontDetails = new List <FontDetail>();
            }

            FontDetails.Add(fontDetail);
            return(this);
        }