Beispiel #1
0
        private void TakeCommands()
        {
            do
            {
                CurrentCommand = Console.ReadLine();

                switch (CurrentCommand.ToLower())
                {
                case "quit":
                    break;

                case "edit":
                    RunNewEditor();
                    break;

                case "save":
                    SaveCurrentFile();
                    break;

                case "currentfile":
                    PrintCurrentFile();
                    break;

                case "clear":
                    ClearScreen();
                    break;

                default:
                    Console.Write("\nCommand not understood, try:\nCurrentFile\nSave\nQuit\nEdit\n\n>");
                    break;
                }
            }while (CurrentCommand.ToLower() != "quit");
        }