示例#1
0
        //
        public static void Render(OutputBox outBox, Point topLeft, int boxWidth, int boxHeight)
        {
            RenderBox.Render(outBox, topLeft, boxWidth, boxHeight);
            string text      = outBox.Text;
            int    startPosX = topLeft.PosX + 1;
            int    startPosY = topLeft.PosY + 1;;

            Console.BackgroundColor = ConsoleColor.Black;
            Console.ForegroundColor = ConsoleColor.White;

            for (int i = 0; i < text.Length; i++)
            {
                Console.SetCursorPosition(startPosX, startPosY);
                Console.Write(text[i]);
                if (startPosX == boxWidth + topLeft.PosX - 1)
                {
                    startPosY++;
                    startPosX = topLeft.PosX + 1;
                }
                else
                {
                    startPosX++;
                }
            }
        }
        public override void Render()
        {
            base.Render();

            RenderBox.Render(this.InputBox, new Point(1, (int)Math.Floor(Console.WindowHeight / 1.4) + 1)
                             , (int)Math.Floor(Console.WindowWidth / 1.08), 4);

            RenderOutputBox.Render(this.OutputBox, new Point(1, 1),
                                   (int)Math.Floor(Console.WindowWidth / 1.7), (int)Math.Floor(Console.WindowHeight / 1.7) + 1);
        }
        public override void Render()
        {
            base.Render();
            RenderTaskbar.Render(Taskbar, (int)Math.Floor(Console.WindowHeight / 1.4));

            RenderBox.Render(this.InputBox, new Point(1, (int)Math.Floor(Console.WindowHeight / 1.4) + 1)
                             , (int)Math.Floor(Console.WindowWidth / 1.08), 4);

            RenderOutputBox.Render(this.OutputBox1, new Point(1, 1),
                                   (int)Math.Floor(Console.WindowWidth / 1.7), (int)Math.Floor(Console.WindowHeight / 1.7) + 1);

            RenderOutputBox.Render(this.OutputBox2, new Point((int)Math.Floor(Console.WindowWidth / 1.45), Console.WindowTop + 1),
                                   (int)Math.Floor(Console.WindowWidth / 3.9), (int)Math.Floor(Console.WindowHeight / 1.7) + 1);
        }
示例#4
0
        public override void Render()
        {
            base.Render();
            Console.SetCursorPosition(Console.WindowWidth / 2 - 21, Console.WindowHeight / 2 + 5);
            Console.WriteLine("USERNAME : "******"PASSWORD : ");
            RenderBox.Render(InputBox2, new Point(Console.WindowWidth / 2 - 10, Console.WindowHeight / 2 + 8),
                             (int)Math.Floor(Console.WindowWidth / 5.5), 2);

            RenderOutputBox.Render(OutputBox, new Point(5, 1),
                                   Console.WindowWidth - 10, Console.WindowHeight - 3);
        }