Ejemplo n.º 1
0
        public void Start(string command = "")
        {
            _running = true;
            Console.Clear();
            //makes it possible to pass in a command on startup
            OnCommandEntered?.Invoke(this, command);
            DisplayShortIntro();
            DisplayUsers(Stregsystem.GetUsers(user => user.Balance > 10));
            DisplayProducts(Stregsystem.ActiveProducts);



            while (_running)
            {
                Console.Clear();
                Console.Clear();
                _usersList.Draw();
                _shortIntro.Draw();
                _productsList.Draw();
                _manual.Draw();
                _UserFeedback.Draw();
                Console.WriteLine($"\nQuick buy:");
                HandleInput();
            }
        }
Ejemplo n.º 2
0
        public void HandleInput()
        {
            string NewCommand = Console.ReadLine();

            OnCommandEntered?.Invoke(this, NewCommand);
        }