public AdminPageViewModel(INavigationService navigationService, IWeb3Service web3Service) : base(navigationService) { this.web3Service = web3Service; this.Title = "Zloto Lotto Admin"; this.WithdrawCommand = new DelegateCommand(this.Withdraw, this.CanWithdraw); this.DepositCommand = new DelegateCommand(this.Deposit, this.CanDeposit); }
public WalletInfoViewModel(IWeb3Service web3Service, INetworkService networkService, INavigationService navigationService) { _web3Service = web3Service; _networkService = networkService; _navigationService = navigationService; TokenListItemPressed = new Command <Token>((t) => OnTokenListItemPressed(t).SafeFireAndForget(true)); RefreshPressed = new Command(() => Device.BeginInvokeOnMainThread(() => OnRefreshPressed().SafeFireAndForget(true))); }
public ExchangeTokensPageViewModel(INavigationService navigationService, IWeb3Service web3Service) : base(navigationService) { this.web3Service = web3Service; this.Title = "Exchange tickets"; this.BuyTokensCommand = new DelegateCommand(this.BuyTokens, this.CanBuyTokens); this.SellTokensCommand = new DelegateCommand(this.SellTokens, this.CanSellTokens); }
public UnlockAccountPageViewModel(INavigationService navigationService, IAccountService accountService, IWeb3Service web3Service) : base(navigationService) { this.accountService = accountService; this.web3Service = web3Service; this.Title = "Unlock Account"; this.UnlockAccountCommand = new DelegateCommand(this.UnlockAccount, this.CanUnlockAccount); this.GoToCreateCommand = new DelegateCommand(this.GoToCreate); }
public CreateAccountPageViewModel(INavigationService navigationService, IAccountService accountService, IWeb3Service web3Service) : base(navigationService) { this.accountService = accountService; this.web3Service = web3Service; this.Title = "Create Account"; this.ContinueCommand = new DelegateCommand(this.Continue); this.CreateAccountCommand = new DelegateCommand(this.CreateAccount, this.CanCreateAccount); this.RestoreAccountCommand = new DelegateCommand(this.RestoreAccount, this.CanRestoreAccount); }
public MainPageViewModel(INavigationService navigationService, IWeb3Service web3Service) : base(navigationService) { this.web3Service = web3Service; this.Title = "Zloto Lotto"; this.Address = this.web3Service.Address; this.ScratchCommand = new DelegateCommand(this.Scratch, this.CanScratch); this.OpenAddressCommand = new DelegateCommand(this.OpenAddress); this.GoToExchangeCommand = new DelegateCommand(this.GoToExchange); }
public WalletSendViewModel(IWeb3Service web3Service, IDialogService dialogService, INavigationService navigationService) { _web3Service = web3Service; _dialogService = dialogService; _navigationService = navigationService; SendTransactionPressed = new Command(async() => { await OnSendTransactionPressed().ConfigureAwait(true); }); }
public LoginViewModel(IWeb3Service web3Service, INavigationService navigationService, IDialogService dialogService) { _web3Service = web3Service; _navigationService = navigationService; _dialogService = dialogService; PrivateKeyReturnCommand = new Command <string>((s) => OnPrivateKeyReturn(s).SafeFireAndForget(true)); PrivateKeyTextChangedCommand = new Command <TextChangedEventArgs>((args) => OnPrivateKeyTextChanged(args).SafeFireAndForget(true)); KeystoreCommand = new Command(() => OnKeystoreClicked().SafeFireAndForget(true)); ChooseEndpointPressed = new Command(() => OnChooseEndpointPressed().SafeFireAndForget(true)); DevLogButtonPressed = new Command(() => OnDevLogButtonPressed().SafeFireAndForget(true)); MessagingCenter.Subscribe <LoginView>(this, "OnAppearing", (l) => OnViewAppearing().SafeFireAndForget(true)); App.SettingsChangedEvent += OnSettingsChanged; Connectivity.ConnectivityChanged += OnNetworkAccessChanged; }
public CountryService(IRepository <User> userRepository, IRepository <Login> loginRepository, IRepository <Country> countryRepository, IRepository <CountryActivityRule> countryRuleRepository, IRepository <BlockDetail> blockRepository, IWeb3Service web3Service ) { _userRepository = userRepository; _loginRepository = loginRepository; _countryRepository = countryRepository; _countryRuleRepository = countryRuleRepository; _blockRepository = blockRepository; _web3Service = web3Service; }
public ProfileService(IRepository <User> userRepository, IRepository <Login> loginRepository, IPasswordStorage encryptPassword, IRepository <BlockDetail> blockRepository, IRepository <Post> postRepository, IRepository <PostImage> postImageRepository, IWeb3Service web3Service, IJwtHandler jwtHandler) { _userRepository = userRepository; _loginRepository = loginRepository; _blockRepository = blockRepository; _postRepository = postRepository; _postImageRepository = postImageRepository; _web3Service = web3Service; }
public WalletRootViewModel(IWeb3Service web3Service) { _web3Service = web3Service; try { var addressString = new string(_web3Service.Account.Address.Take(titleAddressLength).ToArray()) + "..."; RootNavigationBarTitle = $"Wallet: {addressString}"; } catch (NullReferenceException e) when(_web3Service.Account is null) { Log.Warning(e, "Account was null."); } catch (NullReferenceException e) when(_web3Service.Account.Address is null) { Log.Warning(e, "Account.Address was null."); } }
public void OneTimeSetUp() { //要使用到的 _web3Service = new Web3Service(this._web3Helper, this._httpClientFactory, this._logger); }
/// <summary> /// Web3Controller /// </summary> public Web3Controller(IWeb3Service web3Service) { this._web3Service = web3Service; }