Пример #1
0
        public async void DeleteCurrentWallet(WalletDetailsViewModel wd)
        {
            try
            {
                IsWalletPanelEnabled = false;
                await _serviceWallet.DeleteWalletsAsync(_currentWallet.Guid);

                Wallets.Remove(wd);

                RaisePropertyChanged(nameof(CurrentWallet));
                RaisePropertyChanged(nameof(Wallets));
            }
            catch (Exception ex)
            {
                MessageBox.Show($"Wallet delete was failed: {ex.Message}");
                return;
            }
            finally
            {
                IsWalletPanelEnabled = true;
            }

            MessageBox.Show($"Wallet was deleted successfully!");
        }