Exemple #1
0
        public void GetVersions_Test()
        {
            var versions = api.GetVersions(Region.euw);

            Assert.IsNotNull(versions);
            Assert.IsTrue(versions.Count() > 0);
        }
Exemple #2
0
        public App()
        {
            if (!CrossConnectivity.Current.IsConnected)
            {
                MainPage = new NavigationPage(new NoInternetPage());
            }
            else
            {
                var versions = staticApi.GetVersions(Region.euw);
                appVersion = versions[0];
                LoadPageConnected();
            }
            CrossConnectivity.Current.ConnectivityChanged += async(sender, e) =>
            {
                if (!e.IsConnected)
                {
                    await UserDialogs.Instance.AlertAsync("Error", "You have lost internet connection", "Okay");

                    MainPage = new NavigationPage(new NoInternetPage());
                }
                else
                {
                    LoadPageConnected();
                }
            };
        }