Exemple #1
0
        public static void Main()
        {
            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
            MyTunesEngine engine = new MyTunesEngine();

            StartOperations(engine);
        }
        private static void StartOperations(MyTunesEngine engine)
        {
            string line = Console.ReadLine();

            while (line != "end")
            {
                if (line == string.Empty)
                {
                    line = Console.ReadLine();
                    continue;
                }

                engine.ParseCommand(line);
                line = Console.ReadLine();
            }

            string printerResult = engine.Printer.SendToConsole();
            Console.Write(printerResult);
        }
Exemple #3
0
        private static void StartOperations(MyTunesEngine engine)
        {
            string line = Console.ReadLine();

            while (line != "end")
            {
                if (line == string.Empty)
                {
                    line = Console.ReadLine();
                    continue;
                }

                engine.ParseCommand(line);
                line = Console.ReadLine();
            }

            string printerResult = engine.Printer.SendToConsole();

            Console.Write(printerResult);
        }
 public static void Main()
 {
     Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
     MyTunesEngine engine = new MyTunesEngine();
     StartOperations(engine);
 }