Esempio n. 1
0
        public static iiWebPage getInstance(string urlString, ContentView parent, View returnPoint)
        {
            iiWebPage result = null;

            if (activeWebPages == null)
            {
                activeWebPages = new Dictionary <string, iiWebPage>();
            }
            if (activeWebPages.ContainsKey(urlString))
            {
                result = activeWebPages[urlString];
                result.setReturnPoint(returnPoint);
            }
            else
            {
                result = new ImageImprov.iiWebPage(parent, returnPoint);
                result.setupWebpage(urlString);
                activeWebPages[urlString] = result;
            }
            return(result);
        }
Esempio n. 2
0
        protected void createWebButtons()
        {
            tosPage = iiWebPage.getInstance(GlobalStatusSingleton.TERMS_OF_SERVICE_URL, this, Content);
            //tosPage.setReturnPoint(this.Content);
            termsOfServiceLabel = new Label {
                //Text = "Tap here to read our Terms of Service",
                Text      = "Terms of Service",
                TextColor = Color.Blue,
                FontSize  = Device.GetNamedSize(NamedSize.Micro, typeof(Label)),
                HorizontalTextAlignment = TextAlignment.Center,
                VerticalTextAlignment   = TextAlignment.End,
            };
            TapGestureRecognizer tap = new TapGestureRecognizer();

            termsOfServiceLabel.GestureRecognizers.Add(tap);
            tap.Tapped += (sender, args) => {
                //boom.
                returnLayout = Content;
                iiWebPage newPage = iiWebPage.getInstance(GlobalStatusSingleton.TERMS_OF_SERVICE_URL, this, Content);
                Content = newPage;
            };

            privacyPolicyPage  = iiWebPage.getInstance(GlobalStatusSingleton.PRIVACY_POLICY_URL, this, Content);
            privacyPolicyLabel = new Label {
                //Text = "And here for our Privacy Policy",
                Text      = "Privacy Policy",
                TextColor = Color.Blue,
                FontSize  = Device.GetNamedSize(NamedSize.Micro, typeof(Label)),
                HorizontalTextAlignment = TextAlignment.Center,
                VerticalTextAlignment   = TextAlignment.End,
            };
            tap = new TapGestureRecognizer();
            privacyPolicyLabel.GestureRecognizers.Add(tap);
            tap.Tapped += (sender, args) => {
                returnLayout = Content;
                iiWebPage newPage = iiWebPage.getInstance(GlobalStatusSingleton.PRIVACY_POLICY_URL, this, Content);
                Content = newPage;
            };
        }