public void gameList(UserModel user, gameInformation gameInfor) { string[] games = System.IO.File.ReadAllLines("D:\\Data\\SourceTree\\Train\\Week_1\\Project_Week_1\\Project_Week_1\\DB\\GameList.txt"); game: Console.WriteLine("Chon Game Ma Ban Muon Choi: "); gameInfor.inforGame(user); Console.Write("Game Ban Chon La: "); string select = Console.ReadLine(); switch (select) { case "1": string[] inforGame = System.IO.File.ReadAllLines("D:\\Data\\SourceTree\\Train\\Week_1\\Project_Week_1\\Project_Week_1\\DB\\GameList.txt"); int numGame = 0; foreach (string currentSelect in inforGame) { if (numGame == 0) { //Console.WriteLine(select); break; } } case "2": string[] game = System.IO.File.ReadAllLines("D:\\Data\\SourceTree\\Train\\Week_1\\Project_Week_1\\Project_Week_1\\DB\\GameList.txt"); int numGames = 0; foreach (string currentSelect in game) { if (numGames == 1) { Console.WriteLine(currentSelect); } } break; default: { Console.WriteLine("Game Ban Chon Hien Khong Co. Vui Long Chon Lai."); goto game; } } }
public void infoMation(UserModel user, Display display, GameList Game, gameInformation gameInfor) { dangnhap: Console.Write("Chon thong tin ban muon hien thi\n1.Thong Tin Nguoi Dung\n2.Danh sach game\nChuc Nang Ban Chon La: "); string chon = Console.ReadLine(); switch (chon) { case "1": display.inforUser(user); goto dangnhap; break; case "2": string[] games = System.IO.File.ReadAllLines("D:\\Data\\SourceTree\\Train\\Week_1\\Project_Week_1\\Project_Week_1\\DB\\GameList.txt"); Game.gameList(user, gameInfor); break; default: { Console.Write("Chuc Nang Ban Chon Khong Dung. Vui Long Chon Lai"); goto dangnhap; } } }