예제 #1
0
                public static void More(ICommandInterpreter ci)
                {
                    int pos = 2;
                    int lines;

                    try
                    {
                        lines = Console.WindowHeight;
                    }
                    catch (System.IO.IOException)
                    {
                        lines = 25;
                    }

                    string line;

                    while (null != (line = Console.ReadLine()))
                    {
                        Console.WriteLine(line);
                        if (++pos >= lines)
                        {
                            Console.Write("-- More --");
                            ci.ReadNextCharacter();
                            Console.WriteLine();
                            pos = 1;
                        }
                    }
                }