private void GetSaldo() { var worker = new BackgroundWorker(); worker.DoWork += (o, ea) => { var username = Properties.Settings.Default.Username; var password = Properties.Settings.Default.Password; var sms = new SMSWSS10 { USER = username, PASS = password }; var credit = _service.GetSaldo(sms); Dispatcher.Invoke((Action)(() => TbMessage.Text = credit.Replace("\r", "").Replace("\n", ""))); }; worker.RunWorkerCompleted += (o, ea) => { BusyIndicator.IsBusy = false; }; BusyIndicator.IsBusy = true; BusyIndicator.BusyContent = "Cargando información..."; worker.RunWorkerAsync(); }
public void GetSaldoTest() { var data = new SMSWSS10 { USER = "******", PASS = "******" }; var response = service.GetSaldo(data); Debug.WriteLine(response); }