Example #1
0
        private static void Mainzz(string[] args)
        {
            var con = new Window(28, 1, 70, 30, ConsoleColor.Yellow, ConsoleColor.DarkGreen, K.Clipping);

            PrintNumberedBox(con);
            Console.WriteLine();
            var menu = new Menu("Konsole Samples", ConsoleKey.X, 25,

                                new MenuItem('1', "Forms", () => FormDemos.Run(con)),
                                new MenuItem('2', "Boxes", () => BoxeDemos.Run(con)),
                                new MenuItem('3', "Scrolling", () => WindowDemo.Run2(con)),
                                new MenuItem('4', "ProgressBar", () => ProgressBarDemos.ProgressBarDemo(con)),
                                new MenuItem('5', "ProgressBarTwoLine", () => ProgressBarDemos.ProgressBarTwoLineDemo(con)),
                                new MenuItem('6', "Test data", () => TestDataDemo.Run(con)),
                                new MenuItem('7', "SplitLeft, SplitRight", () => SplitDemo.DemoSplitLeftRight(con)),
                                new MenuItem('8', "SplitTop, SplitBottom", () => SplitDemo.DemoSplitTopBottom(con)),
                                new MenuItem('9', "Nested window-scroll", () => TestNestedWindows(con)),
                                new MenuItem('c', "clear screen", () => con.Clear()),
                                new MenuItem('x', "Exit", () => { })

                                );

            menu.OnBeforeMenuItem += (i) => { con.Clear(); };

            PrintNumberedBox(con);

            Console.WriteLine("\nPress 'X' to exit the demo.");

            menu.Run();
        }
Example #2
0
        private static void Main(string[] args)
        {
            var con = new Window(28, 1, 70, 30, ConsoleColor.Yellow, ConsoleColor.DarkGreen, K.Clipping);

            PrintNumberedBox(con);
            Console.WriteLine();
            var menu = new Menu("Konsole Samples", ConsoleKey.X, 25,

                                new MenuItem('f', "Forms", () => FormDemos.Run(con)),
                                new MenuItem('b', "Boxes", () => BoxeDemos.Run(con)),
                                new MenuItem('s', "Scrolling", () => WindowDemo.Run2(con)),
                                new MenuItem('p', "ProgressBar", () => ProgressBarDemos.ProgressBarDemo(con)),
                                new MenuItem('q', "ProgressBarTwoLine", () => ProgressBarDemos.ProgressBarTwoLineDemo(con)),
                                new MenuItem('t', "Test data", () => TestDataDemo.Run(con)),
                                new MenuItem('c', "clear screen", () => con.Clear()),
                                //new MenuItem('r', "RANDOM", () => RandomStuff(con)),
                                new MenuItem('x', "Exit", () => { })

                                );

            menu.OnBeforeMenuItem += (i) => { con.Clear(); };

            PrintNumberedBox(con);

            Console.WriteLine("\nPress 'X' to exit the demo.");

            menu.Run();
        }
Example #3
0
        private static void RunCommand(IConsole con, char cmd)
        {
            switch (cmd)
            {
            case 'f':
                FormDemos.Run(con);
                break;

            case '1':
                WindowDemo.SimpleDemo(con);
                break;

            case 'w':
                WindowDemo.Run(con);
                break;

            case 'r':
                RandomStuff(con);
                break;

            case 'h':
                HiliteDemo.Run(con);
                break;

            case 'l':
                ProgressBarDemos.ParallelDemo();
                break;

            case '2':
                ProgressBarDemos.ParallelConstructorDemo();
                break;

            case 'd':
                ProgressBarDemos.ProgressivelyFasterDemo();
                break;

            case 's':
                WindowDemo.ScrollingDemo(con);
                break;

            case 'p':
                ProgressBarDemos.SimpleDemo(con);
                break;

            case 'b':
                BoxeDemos.Run();
                break;

            case 't':
                TestDataDemo.Run(con);
                break;

            default:
                break;
            }
        }