Beispiel #1
0
        private static async void saveDataOnExitAsync(ZoomPage saveData)
        {
            await Task.Delay(500);

            Debug.WriteLine("DHB:ZoomPage:saveDataOnExitAsync this should print second");
            PhotoUpdateJSON pJSON = new PhotoUpdateJSON();

            pJSON.flag = saveData.flaggedImg.IsVisible;
            pJSON.like = saveData.likedImg.IsVisible;
            //pJSON.tags = saveData.tagEntry.Text;   @todo parse and set tags.
            string jsonQuery = JsonConvert.SerializeObject(pJSON);

            if (jsonQuery != null)
            {
                string apiCall = "update/photo/" + saveData.pid;
                string result  = await GlobalSingletonHelpers.requestFromServerAsync(HttpMethod.Put, apiCall, jsonQuery);
            }
        }
Beispiel #2
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");
        }