示例#1
0
        public void MainMENU()
        {
            while (true)
            {
                Console.Clear();
                string line = "===================================================\n";
                Console.Write(line);
                Console.WriteLine("        MEN SHOES STORE   ");
                Console.WriteLine("-------------------------------------------------");
                Console.WriteLine("1 . Log in.");
                Console.WriteLine("2 . Exit");
                Console.Write(line);
                Console.Write("#You Choose :");
                var choose = Console.ReadLine();
                if (choose == " ")
                {
                    Console.ReadLine();
                }
                switch (choose)
                {
                case "1":
                    Console.Clear();
                    while (true)
                    {
                        Console.Write("---------      LOG IN      ---------\n");
                        Console.Write("-User name :");
                        string name = Console.ReadLine();
                        Console.Write("-Password : "******".  .  .User name or password wrong, please re-enter ! ");
                            Console.ForegroundColor = ConsoleColor.Gray;
                            Console.Write("You want to keep signing in?(y/n) :");
                            string chon = Console.ReadLine();
                            if (chon == "n")
                            {
                                MainMENU();
                            }
                            Console.Clear();
                            Console.Write("---------      LOG IN      ---------\n");
                            Console.Write("-User name: ");
                            name = Console.ReadLine();
                            Console.Write("-Password: "******".  .  .User name or password wrong, please re-enter ! ");
                            Console.ForegroundColor = ConsoleColor.Gray;
                            Console.Write("You want to keep signing in?(y/n) :");
                            string chon = Console.ReadLine();
                            if (chon == "n")
                            {
                                break;
                            }
                            Console.Clear();
                        }
                    }
                    break;

                case "2":
                    Environment.Exit(2);
                    break;

                default:
                    break;
                }
            }
        }
示例#2
0
 public void Login_TestNOTNULL()
 {
     Assert.NotNull(u.login("Nguyenvana", "A12345678"));
 }