Example #1
0
 public VotingViewModel(
     IDialogManager dialogManager,
     IWalletController walletController)
 {
     this.dialogManager    = dialogManager;
     this.walletController = walletController;
 }
Example #2
0
 public ChangePasswordViewModel(
     INotificationService notificationService,
     IWalletController walletController)
 {
     this.notificationService = notificationService;
     this.walletController    = walletController;
 }
Example #3
0
        public CreateLockAccountViewModel(
            IDialogManager dialogManager,
            IWalletController walletController)
        {
            this.dialogManager    = dialogManager;
            this.walletController = walletController;

            this.KeyPairs = new ObservableCollection <KeyPair>(
                walletController.GetStandardAccounts()
                .Select(p => p.GetKey()).ToArray());

            this.Hours = new List <int>();

            this.Hours = Enumerable.Range(0, HoursInDay).ToList();

            this.Minutes = Enumerable.Range(0, MinutesInHour).ToList();

            var now = DateTime.UtcNow;

            this.MinimumDate = now.Date;
            this.UnlockDate  = now;

            // Set unlock time
            var time = now.TimeOfDay;

            this.UnlockHour   = time.Hours;
            this.UnlockMinute = time.Minutes;
        }
Example #4
0
 public AssetsViewModel(INavigationService navigationService,
                        IWalletController walletController)
 {
     _navigationService = navigationService;
     _walletController  = walletController;
     Assets             = new ObservableCollection <Coin>();
 }
Example #5
0
 public WalletViewModel(IWalletController walletController, INavigationService navigationService)
 {
     this.walletController   = walletController;
     this.navigationService  = navigationService;
     this.Assets             = new ObservableCollection <Coin>();
     this.LatestTransactions = new ObservableCollection <Transaction>();
 }
Example #6
0
 public VotingViewModel(
     IWalletController walletController,
     IMessagePublisher messagePublisher)
 {
     this.walletController = walletController;
     this.messagePublisher = messagePublisher;
 }
Example #7
0
 public DepositedTransactionsViewModel(INavigationService navigationService,
                                       IWalletController walletController)
 {
     _navigationService = navigationService;
     _walletController  = walletController;
     Transactions       = new ObservableCollection <Transaction>();
 }
 public WalletViewModel(IWalletController walletController, INavigationService navigationService)
 {
     _walletController  = walletController;
     _navigationService = navigationService;
     Assets             = new ObservableCollection <Coin>();
     LatestTransaction  = new ObservableCollection <Transaction>();
 }
 public TransactionBuilderViewModel(
     IDialogManager dialogManager,
     IWalletController walletController)
 {
     this.dialogManager    = dialogManager;
     this.walletController = walletController;
 }
Example #10
0
        protected override void OnExit(ExitEventArgs e)
        {
            // Dispose of controller instances
            this.walletController.Dispose();
            this.walletController = null;

            base.OnExit(e);
        }
Example #11
0
        public PayToViewModel(
            IWalletController walletController,
            IDispatchService dispatchService)
        {
            this.walletController = walletController;
            this.dispatchService  = dispatchService;

            this.Assets = new ObservableCollection <AssetDescriptor>();
        }
        public TradeVerificationViewModel(
            IWalletController walletController,
            IDispatchService dispatchService)
        {
            this.walletController = walletController;
            this.dispatchService  = dispatchService;

            this.Items = new ObservableCollection <TransactionOutputItem>();
        }
Example #13
0
 public ClaimViewModel(
     IWalletController walletController,
     IMessagePublisher messagePublisher,
     IMessageSubscriber messageSubscriber)
 {
     this.walletController  = walletController;
     this.messagePublisher  = messagePublisher;
     this.messageSubscriber = messageSubscriber;
 }
        public AssetDistributionViewModel(
            IDispatchService dispatchService,
            IWalletController walletController)
        {
            this.dispatchService  = dispatchService;
            this.walletController = walletController;

            this.Items = new ObservableCollection <TransactionOutputItem>();
        }
        public CreateMultiSigContractViewModel(
            IDialogManager dialogManager,
            IDispatchService dispatchService,
            IWalletController walletController)
        {
            this.dialogManager    = dialogManager;
            this.dispatchService  = dispatchService;
            this.walletController = walletController;

            this.PublicKeys = new ObservableCollection <string>();
        }
 public DeployContractViewModel(
     IDialogManager dialogManager,
     IFileManager fileManager,
     IFileDialogService fileDialogService,
     IWalletController walletController)
 {
     this.dialogManager     = dialogManager;
     this.fileManager       = fileManager;
     this.fileDialogService = fileDialogService;
     this.walletController  = walletController;
 }
Example #17
0
        public TransferViewModel(
            IDialogManager dialogManager,
            IWalletController walletController,
            IMessagePublisher messagePublisher)
        {
            this.dialogManager    = dialogManager;
            this.walletController = walletController;
            this.messagePublisher = messagePublisher;

            this.Items = new ObservableCollection <TransactionOutputItem>();
        }
 public DeployContractViewModel(
     IFileManager fileManager,
     IFileDialogService fileDialogService,
     IMessagePublisher messagePublisher,
     IWalletController walletController)
 {
     this.fileManager       = fileManager;
     this.fileDialogService = fileDialogService;
     this.messagePublisher  = messagePublisher;
     this.walletController  = walletController;
 }
        public AssetDistributionViewModel(
            IWalletController walletController,
            IMessagePublisher messagePublisher,
            IDispatchService dispatchService)
        {
            this.walletController = walletController;
            this.messagePublisher = messagePublisher;
            this.dispatchService  = dispatchService;

            this.Items = new ObservableCollection <TransactionOutputItem>();
        }
Example #20
0
 public SigningViewModel(
     IClipboardManager clipboardManager,
     IDialogManager dialogManager,
     INotificationService notificationService,
     IWalletController walletController)
 {
     this.clipboardManager    = clipboardManager;
     this.dialogManager       = dialogManager;
     this.notificationService = notificationService;
     this.walletController    = walletController;
 }
Example #21
0
        public CertificateApplicationViewModel(
            IFileManager fileManager,
            IFileDialogService fileDialogService,
            IWalletController walletController)
        {
            this.fileManager       = fileManager;
            this.fileDialogService = fileDialogService;

            this.KeyPairs = walletController.GetStandardAccounts()
                            .Select(p => p.GetKey()).ToArray();
        }
        public ContractParametersViewModel(
            IDialogManager dialogManager,
            IWalletController walletController,
            IDispatchService dispatchService)
        {
            this.dialogManager    = dialogManager;
            this.walletController = walletController;
            this.dispatchService  = dispatchService;

            this.ScriptHashAddresses = new ObservableCollection <string>();
        }
Example #23
0
        public AssetRegistrationViewModel(
            IWalletController walletController,
            IMessagePublisher messagePublisher)
        {
            this.walletController = walletController;
            this.messagePublisher = messagePublisher;

            this.AssetTypes = new ObservableCollection <AssetType>(assetTypes);

            this.Owners  = new ObservableCollection <ECPoint>(this.walletController.GetStandardAccounts().Select(p => p.GetKey().PublicKey));
            this.Admins  = new ObservableCollection <string>(this.walletController.GetNonWatchOnlyAccounts().Select(p => p.Address));
            this.Issuers = new ObservableCollection <string>(this.walletController.GetNonWatchOnlyAccounts().Select(p => p.Address));
        }
Example #24
0
        public ElectionViewModel(
            IWalletController walletController,
            IMessagePublisher messagePublisher)
        {
            this.walletController = walletController;
            this.messagePublisher = messagePublisher;

            // Load book keepers
            var bookKeepers = this.walletController.GetStandardAccounts()
                              .Select(p => p.GetKey().PublicKey);

            this.BookKeepers = new ObservableCollection <ECPoint>(bookKeepers);
        }
        public ImportCertificateViewModel(
            IWalletController walletController)
        {
            this.walletController = walletController;

            // Load certificates
            using (var store = new X509Store())
            {
                store.Open(OpenFlags.ReadOnly);

                this.Certificates = new ObservableCollection <X509Certificate2>(
                    store.Certificates.Cast <X509Certificate2>());
            }
        }
Example #26
0
    public BankController(
        IWalletController wallet,
        IBetSettingsController betSettings,
        ITransactionLedger ledger
        )
    {
        _wallet      = wallet;
        _betSettings = betSettings;
        _ledger      = ledger;

        _ledger.onTransactionCommitted  += handleTransactionCommitted;
        _ledger.onTransactionProgressed += handleTransactionProgressed;
        _ledger.onTransactionAborted    += handleTransactionAborted;
    }
Example #27
0
        public SettingsViewModel(
            IDialogManager dialogManager,
            IWalletController walletController,
            IProcessHelper processHelper,
            ISettingsManager settingsManager,
            IThemeManager themeManager)
        {
            this.dialogManager    = dialogManager;
            this.walletController = walletController;
            this.processHelper    = processHelper;
            this.settingsManager  = settingsManager;
            this.themeManager     = themeManager;

            this.LoadSettings();
        }
Example #28
0
        public AssetRegistrationViewModel(
            IDialogManager dialogManager,
            IWalletController walletController)
        {
            this.dialogManager    = dialogManager;
            this.walletController = walletController;

            this.AssetTypes = new ObservableCollection <AssetType>(assetTypes);

            var nonWatchOnlyAccounts = this.walletController.GetNonWatchOnlyAccounts().ToList();
            var standardAccounts     = nonWatchOnlyAccounts.Where(account => account.Contract.IsStandard);

            this.Owners  = new ObservableCollection <ECPoint>(standardAccounts.Select(p => p.GetKey().PublicKey));
            this.Admins  = new ObservableCollection <string>(nonWatchOnlyAccounts.Select(p => p.Address));
            this.Issuers = new ObservableCollection <string>(nonWatchOnlyAccounts.Select(p => p.Address));
        }
 public FundController(FundContext context, IWalletController walletController)
 {
     _context          = context;
     _walletController = walletController;
 }
 public TransactionsViewModel(IWalletController walletController, INavigationService navigationService)
 {
     _walletController  = walletController;
     _navigationService = navigationService;
     Transactions       = new ObservableCollection <Transaction>();
 }