상속: DelegateCommand, INotifyPropertyChanged
예제 #1
0
        public AccountViewModel(ShellViewModel shell, Wallet wallet, Account account)
            : base(shell)
        {
            _wallet = wallet;
            _account = account;
            _accountState = _wallet.LookupAccountState(_account);
            UpdateAccountStateProperties(1, _accountState); // TODO: Don't hardcode confs

            RenameAccount = new DelegateCommand(RenameAcountAction);
            ImportKey = new DelegateCommand(ImportKeyAction);

            PopulateTransactionHistory();

            FetchUnspentOutputs = new DelegateCommand(FetchUnspentOutputsAction);

            AddPendingOutput = new ButtonCommand("Add output", AddPendingOutputAction);
            RemovePendingOutput = new DelegateCommand<PendingOutput>(RemovePendingOutputAction);
            FinishCreateTransaction = new ButtonCommand("Send transaction", FinishCreateTransactionAction);
            AddPendingOutputAction();
            RecalculateCreateTransaction();

            RequestAddress = new ButtonCommand("Create single-use address", RequestAddressAction);
        }
예제 #2
0
        public AccountViewModel(ShellViewModel shell, Wallet wallet, Account account)
            : base(shell)
        {
            _wallet            = wallet;
            _account           = account;
            _accountProperties = _wallet.LookupAccountProperties(_account);
            UpdateAccountProperties(1, _accountProperties); // TODO: Don't hardcode confs

            RenameAccount = new DelegateCommand(RenameAcountAction);
            ImportKey     = new DelegateCommand(ImportKeyAction);

            PopulateTransactionHistory();

            FetchUnspentOutputs = new DelegateCommand(FetchUnspentOutputsAction);

            AddPendingOutput        = new ButtonCommand("Add output", AddPendingOutputAction);
            RemovePendingOutput     = new DelegateCommand <PendingOutput>(RemovePendingOutputAction);
            FinishCreateTransaction = new ButtonCommand("Send transaction", FinishCreateTransactionAction);
            AddPendingOutputAction();
            RecalculateCreateTransaction();

            RequestAddress = new ButtonCommand("Create single-use address", RequestAddressAction);
        }