Beispiel #1
0
        public AccountLedgerRunner(IWalletRepository walletRepository, INxtServer nxtServer,
                                   IAccountLedgerRepository accountLedgerRepository)
        {
            _walletRepository        = walletRepository;
            _nxtServer               = nxtServer;
            _accountLedgerRepository = accountLedgerRepository;

            Messenger.Default.Register <SecretPhraseResetMessage>(this, (message) => _cancellationTokenSource.Cancel());
        }
Beispiel #2
0
 public BackgroundRunner(INxtServer nxtServer, ITransactionRepository transactionRepository,
                         IBalanceCalculator balanceCalculator, IWalletRepository walletRepository,
                         IContactRepository contactRepository, IAssetTracker assetTracker, IMsCurrencyTracker msCurrencyTracker)
 {
     _nxtServer             = nxtServer;
     _transactionRepository = transactionRepository;
     _balanceCalculator     = balanceCalculator;
     _walletRepository      = walletRepository;
     _contactRepository     = contactRepository;
     _assetTracker          = assetTracker;
     _msCurrencyTracker     = msCurrencyTracker;
 }
Beispiel #3
0
        public SendMoneyViewModel(INxtServer nxtServer, IWalletRepository walletRepository,
                                  IAccountLedgerRepository accountLedgerRepository, IContactRepository contactRepository,
                                  INavigationService navigationService)
        {
            _nxtServer               = nxtServer;
            _walletRepository        = walletRepository;
            _accountLedgerRepository = accountLedgerRepository;
            _contactRepository       = contactRepository;
            _navigationService       = navigationService;

            SendMoneyCommand           = new RelayCommand(SendMoney, () => CanSendMoney());
            nxtServer.PropertyChanged += (sender, args) => SendMoneyCommand.RaiseCanExecuteChanged();
            ErrorsChanged             += (sender, args) => SendMoneyCommand.RaiseCanExecuteChanged();
            ClearFields();
        }
Beispiel #4
0
        public SettingsViewModel(IWalletRepository walletRepository, INxtServer nxtServer, IAccountLedgerRepository accountLedgerRepository,
                                 INavigationService navigationService)
        {
            _walletRepository        = walletRepository;
            _nxtServer               = nxtServer;
            _accountLedgerRepository = accountLedgerRepository;
            _navigationService       = navigationService;

            SaveCommand = new RelayCommand(Save);
            ImportSecretPhraseCommand = new RelayCommand(() => _navigationService.ShowDialog(NavigationDialog.ImportSecretPhraseInfo));

            ServerAddress          = _walletRepository.NxtServer;
            IsNotificationsEnabled = _walletRepository.NotificationsEnabled;
            ReadOnlyAddress        = _walletRepository.IsReadOnlyAccount ? _walletRepository.NxtAccount.AccountRs : string.Empty;
            SecretPhrase           = _walletRepository.SecretPhrase;
        }