Ejemplo n.º 1
0
        public override void HandleRepaint(ConsoleGui.Interfaces.Drawing.IDrawingContext context)
        {
            context.DrawThinBorder(this.Region);
            if (HasFocus)
            {
                context.DrawStringAlligned(context.Invert("<" + _text + ">"), this.Region.Interior, this.TextAllignment);
            }
            else
            {
                context.DrawStringAlligned("<" + _text + ">", this.Region.Interior, this.TextAllignment);
            }

            base.HandleRepaint(context);
        }
Ejemplo n.º 2
0
        public override void HandleRepaint(ConsoleGui.Interfaces.Drawing.IDrawingContext context)
        {
            var le = new Drawing.TableLayoutEngine(this.Region.Interior);

            le.LayoutRows = 3;
            le.LayoutCols = 3;

            for (int i = 0; i < 3; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    int k = i * 3 + j;
                    context.DrawThinBorder(le.GetRegion(i, j));
                    context.DrawStringAlligned("Text", le.GetRegion(i, j).Interior, (Drawing.TextAllignment)k);
                }
            }

            base.HandleRepaint(context);
        }
Ejemplo n.º 3
0
 public override void HandleRepaint(ConsoleGui.Interfaces.Drawing.IDrawingContext context)
 {
     context.DrawStringAlligned(Text, Region, TextAllignment);
     base.HandleRepaint(context);
 }