Ejemplo n.º 1
0
        public App()
        {
            Xamarin.FormsBook.Toolkit.Toolkit.Init();

            // Load previous AppData if it exists.
            if (Properties.ContainsKey("appData"))
            {
                AppData = AppData.Deserialize((string)Properties["appData"]);
            }
            else
            {
                AppData = new AppData();
            }

            // Launch home page.
            Page homePage = new DataTransfer6HomePage();

            MainPage = new NavigationPage(homePage);

            // Possibly navigate to info page.
            if (Properties.ContainsKey("isInfoPageActive") &&
                (bool)Properties["isInfoPageActive"])
            {
                homePage.Navigation.PushAsync(new DataTransfer6InfoPage(), false);
            }
        }
Ejemplo n.º 2
0
        public App()
        {
            // Ensure link to Toolkit library.
            new Xamarin.FormsBook.Toolkit.ObjectToIndexConverter<object>();

            // Load previous AppData if it exists.
            if (Properties.ContainsKey("appData"))
            {
                AppData = AppData.Deserialize((string)Properties["appData"]);
            }
            else
            {
                AppData = new AppData();
            }

            // Launch home page.
            Page homePage = new DataTransfer6HomePage();
            MainPage = new NavigationPage(homePage);

            // Possibly navigate to info page.
            if (Properties.ContainsKey("isInfoPageActive") &&
                (bool)Properties["isInfoPageActive"])
            {
                homePage.Navigation.PushAsync(new DataTransfer6InfoPage(), false);
            }
        }