예제 #1
0
        public void Start()
        {
            while (true)
            {
                try
                {
                    string commands = this.ReadCommands();

                    if (commands.Equals("exit"))
                    {
                        break;
                    }
                    if (string.IsNullOrEmpty(commands)) // checks if its null or if the first element is nullOrEmpty
                    {
                        continue;
                    }

                    this.ProcessCommands(commands);
                    if (LoggedUser != null)
                    {
                        Saver.CreateUserFile(LoggedUser);
                    }
                    //this.PrintReports(commandResult);
                }
                catch (Exception ex)
                {
                    Writer.WriteLine(ex.Message);
                }
            }
        }