public ConsoleKeyInfo StartMenu()
        {
            do
            {
                Console.Clear();
                UI.Wellcome();
                Console.WriteLine("");
                Console.WriteLine("1. Log In  |  2. Sign Up");
                ConsoleKeyInfo MenuChoice = Console.ReadKey(true);

                if (MenuChoice.KeyChar == '1' || MenuChoice.KeyChar == '2')
                {
                    return(MenuChoice);
                }
            } while (true);
        }
Пример #2
0
        static void Main(string[] args)
        {
            #region Console Configurations
            //Connection strings:
            //DESKTOP-VCB6LRK\SQLEXPRESS
            //PAPMAN-PC\SQLEXPRESS

            //Console Configurations:
            //Debuger:
            //         width :106
            //         height:30
            //         Font  :20
            //AppExe :
            //         Left:320
            //         Top :182
            //         Font:20

            // TODO:
            // 2. Fix Admin Modification Access in MainProcedure
            #endregion


            #region Inits
            MainProcedure procedure = new MainProcedure();
            UIProcedures  UI        = new UIProcedures();
            UserSignUp    NewUser   = new UserSignUp();
            #endregion

            Console.Clear();
            UI.Wellcome();
            bool LogOut = false;


            do
            {
                if (procedure.StartMenu().KeyChar == '2')
                {
                    NewUser.SignUp();
                }
                else
                {
                    Console.Clear();
                    UI.Wellcome();
                    Console.Write("Username: "******"Password: "******"Are you Sure?(y/n)");
                        char TrueLogOut = Console.ReadKey(true).KeyChar;
                        if (TrueLogOut == 'y')
                        {
                            LogOut = false;
                        }
                    } while (LogOut);
                }
            } while (true);
        }