示例#1
0
        public RootPage()
        {
            MenuPage = new MenuPage();

            MenuPage.OnMenuSelected += (menuItem) => NavigateToMenu(menuItem);
            MenuPage.IsEnabled       = false;

            Master = MenuPage;

            var page = new ScanPage();

            LoadSettings(page);

            Detail = new NavigationPage(new ContentPage {
                Content = new Grid {
                    Children =
                    {
                        new ActivityIndicator {
                            IsRunning = true
                        }
                    }
                }
            });
            NavigationPage.SetHasNavigationBar(Detail, false);
        }
示例#2
0
        async void LoadSettings(ScanPage page)
        {
            await Globals.Settings.Read();
            Globals.Settings.ChangAndRebuild();

            var useSettings = Globals.Settings.Items.FirstOrDefault((s) => s.Default);
            if (useSettings == null && Globals.Settings.Items.Count > 0)
            {
                useSettings = Globals.Settings.Items[0];
                useSettings.Default = true;
                Globals.Settings.Write();
            }
            page.CurrentSettingValues = useSettings; 
            Detail = new NavigationPage(page);
            NavigationPage.SetHasNavigationBar(Detail, true);
        }
示例#3
0
        async void LoadSettings(ScanPage page)
        {
            await Globals.Settings.Read();

            Globals.Settings.ChangAndRebuild();

            var useSettings = Globals.Settings.Items.FirstOrDefault((s) => s.Default);

            if (useSettings == null && Globals.Settings.Items.Count > 0)
            {
                useSettings         = Globals.Settings.Items[0];
                useSettings.Default = true;
                Globals.Settings.Write();
            }
            page.CurrentSettingValues = useSettings;
            Detail = new NavigationPage(page);
            NavigationPage.SetHasNavigationBar(Detail, true);
        }
示例#4
0
        public RootPage()
        {
            MenuPage = new MenuPage();
   
            MenuPage.OnMenuSelected += (menuItem) => NavigateToMenu(menuItem);
            MenuPage.IsEnabled = false;

            Master = MenuPage;
        
            var page = new ScanPage();
            LoadSettings(page);
           
            Detail = new NavigationPage(new ContentPage {
                Content= new Grid {
                    Children= {
                        new ActivityIndicator{
                            IsRunning= true
                        }
                    }
                }
            });
            NavigationPage.SetHasNavigationBar(Detail, false);
        }