private void btnaplicar_Click(object sender, RoutedEventArgs e) { if (txtIp.Text == "" || txtPort.Text == "") { lbl.Content = "Rellena los campos."; } else { try { ClienteFisio.Properties.Settings.Default.ServerFisioPort = int.Parse(txtPort.Text); ClienteFisio.Properties.Settings.Default.ServerFisioIp = txtIp.Text; ClienteWCF.recon(); lbl.Content = "Cambios realizados."; this.Close(); } catch (FormatException ex) { lbl.Content = "Introduce un valor correcto."; } } }