public void Cinema()
        {
            while (true)
            {
                Console.Clear();
                MenuCinema();
                int number;
                while (true)
                {
                    bool isINT = Int32.TryParse(Console.ReadLine(), out number);
                    if (!isINT)
                    {
                        Console.WriteLine("Giá trị sai vui lòng nhập lại. ");
                        Console.Write("#Chọn: ");
                    }
                    else if (number < 0 || number > 4)
                    {
                        Console.WriteLine("Giá trị sai vui lòng nhập lại từ 1 - 4.");
                        Console.Write("#Chọn : ");
                    }
                    else
                    {
                        break;
                    }
                }

                /*
                 * TryParse phương pháp không ném một ngoại lệ nếu chuyển đổi thất bại. Nó loại bỏ sự cần thiết phải sử dụng xử lý ngoại lệ
                 * để kiểm tra cho một Format Exception trong trường hợp không hợp lệ và không thể được thành công phân tích cú pháp.
                 */
                Console.WriteLine("=============================================================");
                switch (number)
                {
                case 1:
                    Console.Clear();
                    MoviesInformation infomovie = new MoviesInformation();
                    infomovie.ShowInformationMovie();
                    break;

                case 2:
                    BookingTicker ticker = new BookingTicker();
                    ticker.MenuBookingTicker();
                    Console.Clear();
                    break;

                case 3:
                    Information info = new Information();
                    // info.Information_acc ();
                    Console.ReadLine();
                    break;

                case 4:
                    UserInterface user = new UserInterface();
                    user.InterfaceCinema();
                    return;
                }
            }
        }
        // static string link;
        static void Main(string[] args)
        {
            UserInterface login = new UserInterface();

            login.InterfaceCinema();
            // Read ("ConnectionString.txt");
            // using (DBHelper.OpenConnection (link)) {

            // }
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            Console.Clear();
            List <string> chars = new List <string> ()
            {
                ".",
                ".",
                ".",
                "T",
                "H",
                "Ế",
                " ",
                "G",
                "I",
                "Ớ",
                "I",
                " ",
                "P",
                "H",
                "I",
                "M",
                " ",
                "T",
                "R",
                "Ê",
                "N",
                " ",
                "Đ",
                "Ầ",
                "U",
                " ",
                "N",
                "G",
                "Ó",
                "N",
                " ",
                "T",
                "A",
                "Y"
            };

            string[] a =
            {
                "...",
                "Xin chào bạn!",
            };
            for (int i = 0; i < chars.Count; i++)
            {
                Console.Write(chars[i]);
                if (i == 2)
                {
                    Console.WriteLine();
                }
                Console.ResetColor();
                Thread.Sleep(50);
            }
            Console.WriteLine();
            for (int i = 0; i < a.Length; i++)
            {
                Console.WriteLine(a[i]);
                Thread.Sleep(100);
            }
            Thread.Sleep(1000);
            UserInterface.InterfaceCinema();
        }