private void Button_Student_Click(object sender, RoutedEventArgs e) { int idGame = gameClient.NewGame(playerThis.UserName, 1); StudentBoard studentBoard = new StudentBoard(playerThis, idGame); studentBoard.Show(); this.Close(); }
private void Button_ConnectGame(object sender, RoutedEventArgs e) { game = gameClient.ConnectToGame(playerThis.UserName); if (game == null) { label_Message.Content = Properties.Resources.message_NoGameCreated; } else { if (game.idBoard == 0) { TeacherBoard teacherBoard = new TeacherBoard(playerThis, game.idGame); teacherBoard.Show(); this.Close(); } else { StudentBoard studentBoard = new StudentBoard(playerThis, game.idGame); studentBoard.Show(); this.Close(); } } }