Пример #1
0
        public void Run()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("1. Stadium\n2. Games\n3. Players\n0. Exit");
                Console.Write("Action: ");
                switch (Console.ReadLine())
                {
                case "0":
                    Fts.Save();
                    ges.Save();
                    pls.Save();
                    return;

                case "1":
                    Stadium();
                    break;

                case "2":
                    Game();
                    break;

                case "3":
                    Player();
                    break;

                default:
                    Console.WriteLine("Wrong index\nPress any key to continue...");
                    Console.ReadKey();
                    break;
                }
            }
        }
Пример #2
0
        public void Run()
        {
            while (true)
            {
                var table = new ConsoleTable("1.", "Stadium")
                            .AddRow("2.", "Games")
                            .AddRow("3", "Players")
                            .AddRow("0.", "Exit");
                table.Write(Format.Alternative);
                Console.Write("Choose an action: ");
                switch (Console.ReadLine())
                {
                case "0":
                    Fts.Save();
                    ges.Save();
                    pls.Save();
                    return;

                case "1":
                    Stadium();
                    break;

                case "2":
                    Game();
                    break;

                case "3":
                    Player();
                    break;

                default:
                    Console.WriteLine("Wrong index\nPress any key to continue...");
                    Console.ReadKey();
                    break;
                }
            }
        }