Exemplo n.º 1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            NavigationController.SetNavigationBarHidden(false, false);

            this.SetTranslation();
            this.bindings = new List <Binding>()
            {
                this.SetBinding(() => ViewModel.AppVersion, () => LabelAppVersion.Text, BindingMode.OneWay),
                this.SetBinding(() => ViewModel.ProjectAuthor, () => LabelAuthor.Text, BindingMode.OneWay),

                this.SetBinding(() => ViewModel.BlogUrl, () => LinkBlog.Text, BindingMode.OneWay),
                this.SetBinding(() => ViewModel.LinkedInUrl, () => LinkLinkedin.Text, BindingMode.OneWay),
                this.SetBinding(() => ViewModel.TwitterUrl, () => LinkTwitter.Text, BindingMode.OneWay),
                this.SetBinding(() => ViewModel.CognitiveServicesUrl, () => LinkPoweredBy.Text, BindingMode.OneWay),
            };

            LinkBlog.UserInteractionEnabled = true;
            LinkBlog.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                this.ViewModel.GotoUrlCommand.Execute(ViewModel.BlogUrl);
            }));
            LinkLinkedin.UserInteractionEnabled = true;
            LinkLinkedin.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                this.ViewModel.GotoUrlCommand.Execute(ViewModel.LinkedInUrl);
            }));
            LinkTwitter.UserInteractionEnabled = true;
            LinkTwitter.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                this.ViewModel.GotoUrlCommand.Execute(ViewModel.TwitterUrl);
            }));
            LinkPoweredBy.UserInteractionEnabled = true;
            LinkPoweredBy.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                this.ViewModel.GotoUrlCommand.Execute(ViewModel.CognitiveServicesUrl);
            }));
            LinkGitHub.UserInteractionEnabled = true;
            LinkGitHub.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                this.ViewModel.GotoGitHubCommand.Execute(null);
            }));
            LinkPrivacy.UserInteractionEnabled = true;
            LinkPrivacy.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                this.ViewModel.GotoPrivacyPolicyCommand.Execute(null);
            }));
        }
Exemplo n.º 2
0
        void ReleaseDesignerOutlets()
        {
            if (LabelAppName != null)
            {
                LabelAppName.Dispose();
                LabelAppName = null;
            }

            if (LabelAppVersion != null)
            {
                LabelAppVersion.Dispose();
                LabelAppVersion = null;
            }

            if (LabelAuthor != null)
            {
                LabelAuthor.Dispose();
                LabelAuthor = null;
            }

            if (LabelBlog != null)
            {
                LabelBlog.Dispose();
                LabelBlog = null;
            }

            if (LinkBlog != null)
            {
                LinkBlog.Dispose();
                LinkBlog = null;
            }

            if (LabelLinkedin != null)
            {
                LabelLinkedin.Dispose();
                LabelLinkedin = null;
            }

            if (LinkLinkedin != null)
            {
                LinkLinkedin.Dispose();
                LinkLinkedin = null;
            }

            if (LabelTwitter != null)
            {
                LabelTwitter.Dispose();
                LabelTwitter = null;
            }

            if (LinkTwitter != null)
            {
                LinkTwitter.Dispose();
                LinkTwitter = null;
            }

            if (LabelPoweredBy != null)
            {
                LabelPoweredBy.Dispose();
                LabelPoweredBy = null;
            }

            if (LinkPoweredBy != null)
            {
                LinkPoweredBy.Dispose();
                LinkPoweredBy = null;
            }

            if (LinkGitHub != null)
            {
                LinkGitHub.Dispose();
                LinkGitHub = null;
            }

            if (LinkPrivacy != null)
            {
                LinkPrivacy.Dispose();
                LinkPrivacy = null;
            }
        }