private async Task SetErrorViewAsync() { Debug.WriteLine("NewsViewModel - SetServiceError()"); if (ErrorKind == ServiceErrorKind.None) { return; } if (IsRefreshing) { IsRefreshing = false; } var eventPage = ErrorKind.ToNewsServiceErrorPage(); _eventTracker.Display(eventPage); ErrorTitle = ErrorKind.ToTitle(); ErrorDescription = ErrorKind.ToMessage(); if (HasEmptyData) { ShowErrorView = true; } else { await UserDialogs.Instance.AlertAsync(ErrorDescription, ErrorTitle, "OK"); } }
public BookingViewModel() { Debug.WriteLine($"BookingViewModel - Ctor()"); _eventTracker = new AppCenterEventTracker(); Title = Strings.Strings.BookingPageTitle; _eventTracker.Display(EventPage.BookingPage); }
public AboutViewModel() { _eventTracker = new AppCenterEventTracker(); _contact = new Contact(); _browser = new Infrastructure.Browser(); _deepLinkingLauncher = new DeepLinkingLauncher(); Title = Strings.Strings.AboutPageTitle; AvilaAppVersion = AppInfo.VersionString; _eventTracker.Display(EventPage.AboutPage); }
public NewsViewModel() { Debug.WriteLine("NewsViewModel - Ctor()"); _dataService = new DataService(); _eventTracker = new AppCenterEventTracker(); _deepLinkingLauncher = new DeepLinkingLauncher(); Title = Strings.Strings.NewsPageTitle; News = new ObservableCollection <News>(); Task.Run(async() => await GetNewsAsync()); _eventTracker.Display(EventPage.NewsPage); }
private void SetErrorView() { Debug.WriteLine($"BookingViewModel - SetErrorView()"); if (ErrorKind == ServiceErrorKind.None) { return; } var eventPage = ErrorKind.ToBookingWebviewErrorPage(); _eventTracker.Display(eventPage); ErrorTitle = ErrorKind.ToTitle(); ErrorDescription = ErrorKind.ToMessage(); ShowErrorView = true; }
public HomeViewModel() { _eventTracker = new AppCenterEventTracker(); _contact = new Contact(); _map = new Map(); this.Title = Strings.Strings.HomePageTitle; this.AvilaPhoneNumber = Strings.Strings.HomePageAvilaPhoneNumber; this.AvilaAddress = new Address { Name = Strings.Strings.HomePageAvilaAddressName, Street = Strings.Strings.HomePageAvilaAddressStreet, ZipCode = Strings.Strings.HomePageAvilaAddressZipCode, City = Strings.Strings.HomePageAvilaAddressCity, Country = Strings.Strings.HomePageAvilaAddressCountry }; this.AvilaEmail = Strings.Strings.HomePageAvilaEmail; _eventTracker.Display(EventPage.HomePage); }