/// <summary> /// metodo que determina los botones disponibles para la seleccion de campaña del jugador /// </summary> private void determinarBotones() { ServiceReference4.Service1Client service1Client = new ServiceReference4.Service1Client(); int progreso = service1Client.GetCampaniaJugador(idJugador); Console.WriteLine("Progreso: " + progreso); if (progreso == 0) { Console.WriteLine("quito el continuar"); continuaBT.IsEnabled = false; } }
private void Button_Click_1(object sender, RoutedEventArgs e) //llama continuar { try { int progreso; ServiceReference4.Service1Client service1Client = new ServiceReference4.Service1Client(); progreso = service1Client.GetCampaniaJugador(idJugador); JuegoCampaña juego = new JuegoCampaña(); juego.getID(idJugador); juego.setIdioma(idioma); juego.ajustarImagenes(progreso); juego.Show(); this.Close(); } catch (System.ServiceModel.EndpointNotFoundException) { MessageBox.Show("Hubo un error al conectar con el servidor", "Error en el host"); } }