// Constructors
        public ConsoleMenu(AccountTable accounts)
        {
            accountTable = accounts;
            accountTable.OnError += InformUser;

            add.OnMessage += InformUser;
            delete.OnMessage += InformUser;
            select.OnMessage += InformUser;
            update.OnMessage += InformUser;
            exit.OnMessage += InformUser;
        }
Exemplo n.º 2
0
        private static void Main(string[] args)
        {
            AccountTable accounts = null;
            try
            {
                accounts = new AccountTable();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.ReadKey();
                return;
            }

            Test.AddAccounts(accounts);
            ConsoleMenu menu = new ConsoleMenu(accounts);
            menu.Start();
        }