示例#1
0
        public void OpenReloginPage(ReloginPage reloginPage)
        {
            rootPage = null;

            NavPage = new BybNavigationPage(reloginPage);
            App.Current.MainPage = NavPage;
        }
示例#2
0
        public void OpenLoginPage()
        {
            rootPage = null;

            NavPage = new BybNavigationPage(new SetupStartPage());
            App.Current.MainPage = NavPage;
        }
示例#3
0
        public async void DoOnVenueEdited(int venueID)
        {
            await App.Navigator.NavPage.PopAsync();

            await App.Navigator.NavPage.PopAsync();

            foreach (var page in NavPage.Navigation.NavigationStack)
            {
                MainSnookerPage aPage = page as MainSnookerPage;
                if (aPage != null)
                {
                    aPage.DoOnVenueEdited(venueID);
                }
            }
        }
示例#4
0
        public async Task GoToVenueProfile(int venueID)
        {
            var openedPage = this.GetOpenedPage(typeof(MainSnookerPage)) as MainSnookerPage;

            if (openedPage != null && openedPage.State == MainSnookerPage.StateEnum.Venue && openedPage.VenueID == venueID)
            {
                return;
            }

            var newPage = new MainSnookerPage();

            newPage.InitAsVenueProfile(venueID);
            await NavPage.PushAsync(newPage);

            this.UpdateNavigationMenuButtons(true);
        }
示例#5
0
        public async Task GoToPersonProfile(int athleteID, ProfilePersonStateEnum state = ProfilePersonStateEnum.Unknown)
        {
            var openedPage = this.GetOpenedPage(typeof(MainSnookerPage)) as MainSnookerPage;

            if (openedPage != null && openedPage.State == MainSnookerPage.StateEnum.Person && openedPage.AthleteID == athleteID)
            {
                return;
            }

            var newPage = new MainSnookerPage();

            newPage.InitAsPersonProfile(athleteID, state);
            await NavPage.PushAsync(newPage);

            this.UpdateNavigationMenuButtons(true);
        }
示例#6
0
        public void OpenMainPage()
        {
            if (Config.App == MobileAppEnum.SnookerForVenues)
            {
                /// Snooker Byb For Venues
                ///

                if (this.fvoMainPage != null)
                {
                    return;
                }

                this.fvoMainPage = new FVOMainPage();

                // create a "NavigationPage"
                this.NavPage = new BybNavigationPage(this.fvoMainPage);
                this.NavPage.BarBackgroundColor = Config.ColorBackground;
                this.NavPage.BarTextColor       = Config.ColorPageTitleBarTextNormal;

                // make the "NavigationPage" the main page of the app
                App.Current.MainPage = this.NavPage;
            }
            else
            {
                /// Snooker Byb
                ///

                if (this.rootPage != null)
                {
                    return; // already open
                }
                this.rootPage = new MainSnookerPage();
                this.rootPage.InitAsRecord();

                // create a "NavigationPage"
                this.NavPage = new BybNavigationPage(this.rootPage);
                this.NavPage.BarBackgroundColor = Config.ColorBackground;
                this.NavPage.BarTextColor       = Config.ColorPageTitleBarTextNormal;

                // create a toolbar
                this.toolBarMenuItem2 = new ToolbarItem()
                {
                    Icon = new FileImageSource()
                    {
                        File = "alert1.png"
                    },
                    Order   = ToolbarItemOrder.Primary,
                    Command = new Command(() =>
                    {
                        this.OpenNotificationsPage();
                    }),
                };
                this.NavPage.ToolbarItems.Add(toolBarMenuItem2);

                // make the "NavigationPage" the main page of the app
                App.Current.MainPage = this.NavPage;

                App.Sync.StatusChanged += (s1, e1) =>
                {
                    if (e1.Completed == true)
                    {
                        doOnSyncCompleted(e1);
                    }
                };
            }

            CheckApiVersionAndNotifyIfNeeded();
        }