Ejemplo n.º 1
0
        public void Render(XGraphics gfx, XPoint origin, string var)
        {
            XPoint pos   = origin.Add(new XPoint(Location));
            XSize  size  = new XSize(Size.Width, Size.Height);
            XRect  lRect = new XRect(pos, size);


            string str = Name;

            if (var != null)
            {
                str = var;
            }

            gfx.DrawRectangle(new SolidBrush(BackgroundColor), lRect.FromMM());


            gfx.DrawString(
                str,
                new Font(Font.FontFamily, Font.Size, Font.Style, GraphicsUnit.World),
                new XSolidBrush(TextColor),
                lRect.FromMM(),
                FromEnum(Allignment));
        }