public WalletManagerViewModel(NavigationStateViewModel navigationState, string title) : base(navigationState, "WalletManager", title)
        {
#if !USE_DIALOG
            ShowCommand = ReactiveCommand.Create(() => navigationState.Screen().Router.Navigate.Execute(this));
#else
            ShowCommand = ReactiveCommand.Create(() => navigationState.Dialog().Router.Navigate.Execute(this));
#endif

            var navigationStateWalletManager = new NavigationStateViewModel()
            {
                Screen     = () => navigationState.Screen(),
                Dialog     = () => navigationState.Dialog(),
                NextView   = () => _home,
                CancelView = () => _home,
            };

            _items = new ObservableCollection <RoutableViewModel>
            {
                new GenerateWalletViewModel(navigationStateWalletManager, "Create new Wallet", this),
                new RecoverWalletViewModel(navigationStateWalletManager, "Recover Wallet"),
                new LoadWalletViewModel(navigationStateWalletManager, "Import Wallet"),
                new TestPasswordViewModel(navigationStateWalletManager, "Test Password"),
                new HardwareWalletViewModel(navigationStateWalletManager, "Connect HW Wallet")
            };

            _wallets = new ObservableCollection <RoutableViewModel>
            {
                new WalletViewModel(navigationStateWalletManager, "Random Wallet (0 BTC)"),
                new WalletViewModel(navigationStateWalletManager, "Random Wallet 2 (0 BTC)"),
                new WalletViewModel(navigationStateWalletManager, "Random Wallet 3 (0 BTC)"),
                new WalletViewModel(navigationStateWalletManager, "Random Wallet 4 (0 BTC)")
            };
        }
        public GenerateWalletPasswordViewModel(NavigationStateViewModel navigationState, IScreen wizardScreen, string title, WalletViewModel wallet, WalletManagerViewModel walletManager)
            : base(new NavigationStateViewModel()
        {
            Screen     = () => wizardScreen,
            Dialog     = () => navigationState.Dialog(),
            NextView   = () => navigationState.NextView(),
            CancelView = () => navigationState.CancelView(),
        }, "GenerateWalletPassword", title)
        {
            ShowCommand = ReactiveCommand.Create(() => wizardScreen.Router.Navigate.Execute(this));
#if !USE_DIALOG
            CancelCommand = ReactiveCommand.Create(() => navigationState.Screen().Router.Navigate.Execute(navigationState.CancelView()));
#else
            CancelCommand = ReactiveCommand.Create(() =>
            {
                navigationState.Dialog().Router.NavigationStack.Clear();
                navigationState.Screen().Router.Navigate.Execute(navigationState.CancelView());
            });
#endif
            NextCommand = ReactiveCommand.Create(() =>
            {
                wallet.Password = _password;
                wizardScreen.Router.Navigate.Execute(
                    new GenerateWalletRecoveryViewModel(navigationState, wizardScreen, "Create Wallet", wallet, walletManager));
            });
        }
        public LegalDocumentHelpViewModel(NavigationStateViewModel navigationState, string title) : base(navigationState, "LegalDocumentHelp", title)
        {
#if !USE_DIALOG
            ShowCommand = ReactiveCommand.Create(() => navigationState.Screen().Router.Navigate.Execute(this));
#else
            ShowCommand = ReactiveCommand.Create(() => navigationState.Dialog().Router.Navigate.Execute(this));
#endif
        }
        public AnonymityLevelsSettingsViewModel(NavigationStateViewModel navigationState, string title) : base(navigationState, "AnonymityLevelsSettings", title)
        {
#if !USE_DIALOG
            ShowCommand = ReactiveCommand.Create(() => navigationState.Screen().Router.Navigate.Execute(this));
#else
            ShowCommand = ReactiveCommand.Create(() => navigationState.Dialog().Router.Navigate.Execute(this));
#endif
        }
        public RecoverWalletViewModel(NavigationStateViewModel navigationState, string title) : base(navigationState, "RecoverWallet", title)
        {
#if !USE_DIALOG
            ShowCommand = ReactiveCommand.Create(() => navigationState.Screen().Router.Navigate.Execute(this));
#else
            ShowCommand = ReactiveCommand.Create(() => navigationState.Dialog().Router.Navigate.Execute(this));
#endif
        }
Beispiel #6
0
        public AddWalletViewModel(NavigationStateViewModel navigationState, string title, WalletManagerViewModel walletManager) : base(navigationState, "AddWallet", title)
        {
#if !USE_DIALOG
            ShowCommand = ReactiveCommand.Create(() => navigationState.Screen().Router.Navigate.Execute(walletManager));
#else
            ShowCommand = ReactiveCommand.Create(() => navigationState.Dialog().Router.Navigate.Execute(walletManager));
#endif
        }
Beispiel #7
0
        public WalletExplorerViewModel(NavigationStateViewModel navigationState, WalletManagerViewModel walletManager) : base(navigationState, "WalletExplorer", "Wallet Explorer")
        {
            ShowCommand = ReactiveCommand.Create(() => navigationState.Screen().Router.Navigate.Execute(this));

            var navigationStateWalletExplorer = new NavigationStateViewModel()
            {
                Screen     = () => navigationState.Screen(),
                Dialog     = () => navigationState.Dialog(),
                NextView   = () => this,
                CancelView = () => this,
            };

            var list = new SourceList <RoutableViewModel>();

            list.Add(new AddWalletViewModel(navigationStateWalletExplorer, "Add Wallet", walletManager));

            walletManager.Wallets.ToObservableChangeSet()
            .Merge(list.Connect())
            .Bind(out _items)
            .AsObservableList();
        }
Beispiel #8
0
        public HelpViewModel(NavigationStateViewModel navigationState) : base(navigationState, "Help", "Help")
        {
            ShowCommand = ReactiveCommand.Create(() => navigationState.Screen().Router.Navigate.Execute(this));

            _items = new ObservableCollection <RoutableViewModel>
            {
                new AboutHelpViewModel(navigationState, "About"),
                new UserSupportHelpViewModel(navigationState, "User Support"),
                new ReportBugHelpViewModel(navigationState, "Report Bug"),
                new DocumentationHelpViewModel(navigationState, "Documentation"),
                new LegalDocumentHelpViewModel(navigationState, "Legal Document")
            };
        }
        public GenerateWalletConfirmViewModel(NavigationStateViewModel navigationState, IScreen wizardScreen, string title, WalletViewModel wallet, WalletManagerViewModel walletManager)
            : base(new NavigationStateViewModel()
        {
            Screen     = () => wizardScreen,
            Dialog     = () => navigationState.Dialog(),
            NextView   = () => navigationState.NextView(),
            CancelView = () => navigationState.CancelView(),
        }, "GenerateWalletConfirm", title)
        {
            _recoveryWords = wallet.RecoveryWords;

            ShowCommand   = ReactiveCommand.Create(() => wizardScreen.Router.Navigate.Execute(this));
            CancelCommand = ReactiveCommand.Create(() => navigationState.Screen().Router.NavigateAndReset.Execute(navigationState.CancelView()));
            NextCommand   = ReactiveCommand.Create(() =>
            {
                walletManager.Wallets.Add(wallet);
#if USE_DIALOG
                navigationState.Dialog().Router.NavigationStack.Clear();
#endif
                navigationState.Screen().Router.NavigateAndReset.Execute(navigationState.NextView());
            });
        }
Beispiel #10
0
        public SettingsViewModel(NavigationStateViewModel navigationState) : base(navigationState, "Settings", "Settings")
        {
            ShowCommand = ReactiveCommand.Create(() => navigationState.Screen().Router.Navigate.Execute(this));

            _items = new ObservableCollection <RoutableViewModel>
            {
                new BitcoinSettingsViewModel(navigationState, "Bitcoin"),
                new TorSettingsViewModel(navigationState, "Tor"),
                new UISettingsViewModel(navigationState, "UI"),
                new LockScreenSettingsViewModel(navigationState, "Lock Screen"),
                new AnonymityLevelsSettingsViewModel(navigationState, "Anonymity Levels"),
                new OtherSettingsSettingsViewModel(navigationState, "Other Settings")
            };
        }
Beispiel #11
0
        public GenerateWalletViewModel(NavigationStateViewModel navigationState, string title, WalletManagerViewModel walletManager) : base(navigationState, "GenerateWallet", title)
        {
            ShowCommand = ReactiveCommand.Create(() =>
            {
#if !USE_DIALOG
                navigationState.Screen().Router.Navigate.Execute(this);
#else
                navigationState.Dialog().Router.Navigate.Execute(this);
#endif
                Router.NavigateAndReset.Execute(
                    new GenerateWalletPasswordViewModel(
                        navigationState,
                        this,
                        "Create Wallet",
                        new WalletViewModel(navigationState, walletManager.Name)
                {
                    Name = walletManager.Name
                },
                        walletManager));
            });
        }
Beispiel #12
0
 public TransactionBroadcasterViewModel(NavigationStateViewModel navigationState) : base(navigationState, "TransactionBroadcaster", "Transaction Broadcaster")
 {
     ShowCommand = ReactiveCommand.Create(() => navigationState.Screen().Router.Navigate.Execute(this));
 }
Beispiel #13
0
 public WalletViewModel(NavigationStateViewModel navigationState, string title) : base(navigationState, "Wallet", title)
 {
     ShowCommand = ReactiveCommand.Create(() => navigationState.Screen().Router.Navigate.Execute(this));
 }