コード例 #1
0
        public void Set(string name, string description, string avatarUrl)
        {
            ShowcaseNameLabel.Text        = name;
            ShowcaseDescriptionLabel.Text = description;

            if (avatarUrl == null)
            {
                ShowcaseImageView.Image = null;
            }
            else
            {
                try
                {
                    ShowcaseImageView.SetImage(new NSUrl(avatarUrl), Images.UnknownUser, (img, err, type, imageUrl) => {
                        if (img == null || err != null)
                        {
                            return;
                        }

                        if (type == SDImageCacheType.None)
                        {
                            ShowcaseImageView.Image = Images.UnknownUser;
                            BeginInvokeOnMainThread(() =>
                                                    UIView.Transition(ShowcaseImageView, 0.25f, UIViewAnimationOptions.TransitionCrossDissolve, () => ShowcaseImageView.Image = img, null));
                        }
                    });
                }
                catch {}
            }
        }
コード例 #2
0
        void ReleaseDesignerOutlets()
        {
            if (ShowcaseDescriptionLabel != null)
            {
                ShowcaseDescriptionLabel.Dispose();
                ShowcaseDescriptionLabel = null;
            }

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

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