Task <bool> validar() { api = new ApiBlockchain(); transactions = api.SearchByHash(usuario.privateKey, usuario.account, usuario.user, usuario.pass, usuario.id, hashArq(filePath)); ApresentarTransactions(transactions); return(Task.FromResult(true)); }
private async void labRegistrar_MouseDown(object sender, MouseButtonEventArgs e) { if (ServiceOK()) { if (VerificarTxtArquivo()) { if (MessageBox.Show("Registrar Arquivo?", "Atenção!", MessageBoxButton.OKCancel, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.OK) { labRegistrar.IsEnabled = false; progress.Visibility = Visibility.Visible; api = new ApiBlockchain(); var result = await api.Registrar(usuario.privateKey, usuario.account, usuario.user, usuario.pass, hashArq(filePath), "bitcoin", 1); protocolos.Add(result); ApresentarProtocolos(); progress.Visibility = Visibility.Hidden; labRegistrar.IsEnabled = true; } } } else { MessageBox.Show("Conexão com serviço indisponível", "Falha na conexão", MessageBoxButton.OK, MessageBoxImage.Warning); } }