Beispiel #1
0
        public void OnImgTapped(object sender, EventArgs args)
        {
            if (((iiBitmapView)sender) != null)
            {
                MasterPage      m1 = ((MasterPage)Application.Current.MainPage);
                MainPageSwipeUI mp = m1.thePages;
                m1.zoomPage.ActiveMetaBallot = new BallotCandidateJSON(); // nada for now.

                iiBitmapView taggedImg = new iiBitmapView {
                    Bitmap    = ((iiBitmapView)sender).Bitmap.Copy(),
                    PhotoMeta = ((iiBitmapView)sender).PhotoMeta,
                };
                m1.zoomPage.MainImage = taggedImg;
                m1.zoomPage.pid       = taggedImg.PhotoMeta.pid;
                m1.zoomPage.buildZoomView();
                //mp.zoomPage.PreviousContent = mp.thePages.leaderboardPage;
                //m1.zoomPage.PreviousContent = mp.leaderboardPage;
                Device.BeginInvokeOnMainThread(() => {
                    //mp.thePages.leaderboardPage.Content = mp.zoomPage.Content;
                    //mp.leaderboardPage.Content = m1.zoomPage.Content;
                    //mp.leaderboardPage.Content = m1.zoomPage;
                    m1.gotoZoomPage();
                });
            }
        }
        public void OnImgTapped(object sender, EventArgs args)
        {
            iiBitmapView activeImg = (iiBitmapView)sender;

            Debug.WriteLine("DHB:SubmissionsImageRowViewCell:OnImgTapped: " + Height + " min height:" + View.MinimumHeightRequest);
            if ((activeImg != null) && (activeImg.Bitmap != null))
            {
                MasterPage      m1 = ((MasterPage)Application.Current.MainPage);
                MainPageSwipeUI mp = m1.thePages;
                //mp.zoomPage.ActiveMetaBallot = new BallotCandidateJSON(); // nada for now.

                iiBitmapView taggedImg = new iiBitmapView {
                    Bitmap            = activeImg.Bitmap.Copy(),
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                };
                m1.zoomPage.MainImage = taggedImg;
                //mp.zoomPage.buildZoomView();
                m1.zoomPage.buildZoomFromUserPhotoMeta(activeImg.PhotoMeta);
                // ahh.... there's 2 pieces of info needed now.  The parent page and subpage.
                // eg profile/subs; profile/likes; eventPage/categories

                /*
                 * mp.zoomPage.PreviousContent = mp.thePages.profilePage;
                 * //mp.zoomPage.PreviousView = mp.thePages.profilePage.Content;
                 * mp.thePages.profilePage.PreviousView = mp.thePages.profilePage.Content;
                 * Device.BeginInvokeOnMainThread(() => {
                 *  mp.thePages.profilePage.Content = mp.zoomPage.Content;
                 * });
                 */
                ContentView active = null;
                if (mp.Position == MainPageSwipeUI.CAMERA_PAGE)
                {
                    //mp.zoomPage.PreviousContent = mp.thePages.cameraPage;
                    //m1.zoomPage.PreviousContent = mp.cameraPage;
                    //mp.thePages.cameraPage.PreviousView = mp.thePages.cameraPage.Content;
//                    active = mp.thePages.cameraPage;
                    active = mp.cameraPage;
                }
                else if (mp.Position == MainPageSwipeUI.PROFILE_PAGE)
                {
                    active = mp.profilePage;
                    //m1.zoomPage.PreviousContent = mp.profilePage;
                    //mp.zoomPage.PreviousView = mp.thePages.profilePage.Content;
                    mp.profilePage.PreviousView = active.Content;
                }
                Device.BeginInvokeOnMainThread(() => {
                    //active.Content = m1.zoomPage.Content;
                    m1.gotoZoomPage();
                });
            }
            Debug.WriteLine("DHB:SubmissionsImageRowViewCell:OnImgTapped: " + Height);
        }
Beispiel #3
0
        public MasterPage()
        {
            BackgroundColor = GlobalStatusSingleton.backgroundColor;

            thePages = new MainPageSwipeUI(loginPage);
            zoomPage = new ZoomPage {
                IsVisible = false,
            };
            defaultNavigation = new KeyPageNavigator {
                HighlightedButtonIndex = 0,
            };

            buildUI();  // so it is reader to go!
                        // for now, keep the construction of the pages in the carousel...

            // bind the footer to the current position on the list view
            Binding binding = new Binding {
                Source = thePages, Path = "Position"
            };

            defaultNavigation.SetBinding(KeyPageNavigator.HighlightedButton, binding);
            Binding headerBinding = new Binding {
                Source = thePages, Path = "Position"
            };

            header.SetBinding(PageHeader.HighlightedButton, headerBinding);

            Binding settingsOnOffBinding = new Binding {
                Source = thePages.profilePage.navRow, Path = "NavHighlightIndex"
            };

            header.SetBinding(PageHeader.ProfileNav, settingsOnOffBinding);

            Content = loginPage;
            Debug.WriteLine("DHB:MasterPage ctor complete");
        }