Exemplo n.º 1
0
        /** -------------- MAIN USER MENU METHODS ------------------------ **/

        ///
        ///<summary>Exectues the Main User Menu. Available options are:
        /// 1 - List of Events
        /// 2 - History of Bets
        /// 3 - Place a Bet
        /// 4 - Available Coins
        /// 5 - Insert Coins
        /// </summary>
        private static void MainApp(string UserEmail)
        {
            do
            {
                if (BetESS.AmountOfNotificationsFrom(UserEmail) > 0)
                {
                    Console.WriteLine("You have new notifications!\n\n");
                    Console.WriteLine(BetESS.NotificationListFrom(UserEmail));
                    BetESS.RemoveNotificationsFrom(UserEmail);
                }
                UserMainMenu.ExecuteMenu();
                switch (UserMainMenu.getOption())
                {
                case 1:
                    ListOfEvents();
                    break;

                case 2:
                    HistoryOfBets(UserEmail);
                    break;

                case 3:
                    PlaceBet(UserEmail);
                    break;

                case 4:
                    AvailableCoins(UserEmail);
                    break;

                case 5:
                    InsertCoins(UserEmail);
                    break;
                }
            } while (UserMainMenu.getOption() != 0);
        }
Exemplo n.º 2
0
        public void login(string username, string password)
        {
            Console.WriteLine(@"User " + username + @" logged in.");
            var User = StaticAccessor.DB.GetUser(0, username);

            UserId = User.Id;
            var UM = new UserMainMenu(UserId);

            UM.ShowDialog();
        }