Exemplo n.º 1
0
        public void ExitSystem()
        {
            RegisterAthenticate regis = new RegisterAthenticate();

            regis.Display();
            Console.ReadKey();

            Environment.Exit(0);
        }
Exemplo n.º 2
0
        public void ChooseMenu()
        {
            UserEnum choose = (UserEnum)int.Parse(Console.ReadLine());

            while (choose == UserEnum.None)
            {
                Console.WriteLine("Envalid Input Try Again!");
                choose = (UserEnum)int.Parse(Console.ReadLine());
            }

            switch (choose)
            {
            case UserEnum.Register:
                var regist = new RegisterAthenticate();
                regist.Registaraion();
                Clear();
                AskUser();
                break;

            case UserEnum.Authenticate:
                //Authenticate autho = new Authenticate();
                //autho.Authorize();
                RegisterAthenticate valid = new RegisterAthenticate();
                valid.AskAuthenticate();
                Clear();
                AskUser();
                break;

            case UserEnum.Exit:
                ExitSystem();
                break;

            default:
                Console.Clear();
                Console.WriteLine("Wrong Input Try again");
                AskUser();
                break;
            }
        }