public MainViewModel(INetworkService networkService, ICurrencyService currencyService) { this.money = new Money() { Rate = 0.8440 }; this.networkService = networkService; this.currencyService = currencyService; this.convertCommand = new DelegateCommand(ConvertExecute, CanConvertExecute); this.rateCommand = new DelegateCommandAsync(RateExecute); }
public override async Task OnNavigatedTo(NavigationEventArgs args) { this.To = "- €"; if (networkService.IsOnline()) { var response = await this.currencyService.GetPoundCurrencyAsync(); this.money = JsonConvert.DeserializeObject<Money>(response); GoogleAnalytics.EasyTracker.GetTracker().SendView("MainPage"); } }