Ejemplo n.º 1
0
        public override void Render(G3Canvas g)
        {
            g.BeginDrawing();

            g.FillRectangle(this.Bound, this.BackgroundColor);

            if (Border.Enabled)
            {
                Border.Draw(g, this.Bound);
            }

            g.EndDrawing();

            Items.Render(g, this);
        }
Ejemplo n.º 2
0
        public override void Render(G3Canvas g)
        {
            if (Text == null)
                Text = string.Empty;

            g.BeginDrawing();

            Rectangle r = this.Bound;
            g.FillRectangle(r, G3Color.WHITE);
            g.Rectangle(r, G3Color.GRAY);

            byte[] chars;

            if (Focused)
            {
                chars = Parent.Encoding.GetBytes(Text + "\u25cf");
            }
            else
            {
                chars = Parent.Encoding.GetBytes(Text);
            }

            chars = CropText(chars, Size.Width);

            g._DrawTextC(chars, FontStyle.Font,
                Location.X + 2 + (FontStyle.Font.TextWidth(chars) / 2),
                Location.Y + (Size.Height / 2),
                FontStyle.FontColor, FontStyle.HaloColor);

            g.EndDrawing();
        }
Ejemplo n.º 3
0
        public override void Render(G3Canvas g)
        {
            if (!_layoutCreated)
            {
                _layoutCreated = true;
                CreateLayout();
            }

            g.BeginDrawing();
            g.FillRectangle(Location.X, Location.Y, Size.Width, Size.Height, G3Color.FromRGB(49, 52, 49));
            g.Rectangle(Location.X, Location.Y, Size.Width - 1, Size.Height, G3Color.GRAY);
            g.EndDrawing();

            if (NumericKeyboard)
            {
                _canvasNum.Render(g);
            }
            else
            {
                _canvasAlfa.Render(g);
            }
        }