private void Button_Teacher_Click(object sender, RoutedEventArgs e) { int idGame = gameClient.NewGame(playerThis.UserName, 0); TeacherBoard teacherBoard = new TeacherBoard(playerThis, idGame); teacherBoard.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(); } } }