Esempio n. 1
0
        public MasterNavigationPage(Page rootPage) : base(rootPage)
        {
            InitializeComponent();
            current = this;

            //set colors
            this.BarBackgroundColor = PageColors.primaryColor;

            Refresh();
            this.Popped       += (sen, e) => Refresh();
            this.Pushed       += (sen, e) => Refresh();
            this.PoppedToRoot += (sen, e) => Refresh();
        }
Esempio n. 2
0
        public App()
        {
            InitializeComponent();
            LoadingPage loadingPage;

            Task load = new Task(() =>
            {
                PreInit();
                DataTools.Load();
                if (enterprise)
                {
                    ((RemoteStorageDatabase)DatabaseHandler.GetDatabase()).RunOnConnectionError(() =>
                    {
                        this.MainPage = new ConnectionErrorPage();
                    });
                }
                homePage = new HomePage();
                homePage.Refresh();
            });
            Action finishedLoading = () =>
            {
                navPage       = new MasterNavigationPage(homePage);
                this.MainPage = navPage;
            };



            loadingPage = new LoadingPage(load, finishedLoading);


            this.MainPage = loadingPage;


            loadingPage.StartLoading();


            if (CrossConnectivity.Current.IsConnected)
            {
                Console.WriteLine("connected");
            }
            else
            {
                Console.WriteLine("not connected");
            }
        }