예제 #1
0
        public void ShowTwitt(Twitt twitt)
        {
            _twitt = twitt;

            var image = ImageLoader.DefaultRequestImage(new Uri(_twitt.user.GetBigProfileImageUrl()), this);

            if (image != null)
            {
                _avatarCG = image.CGImage;
            }
            else
            {
                _avatarCG = UIImage.FromFile(ImagePathes.AvatarBig).CGImage;
            }


            CGImage imgWithMaskCG = _avatarCG.WithMask(_mask);

            _userMaskImageView.Image = new UIImage(imgWithMaskCG);


            _userNameLabel.Text = _twitt.user.name;
            _userNameLabel.SizeToFit();

            _viaLabel.Text = "via " + _twitt.source.Substring(_twitt.source.IndexOf('>') + 1, _twitt.source.LastIndexOf('<') - _twitt.source.IndexOf('>') - 1);
            _viaLabel.SizeToFit();

            //"<a href=\"http://www.retweet-xl.com/\" rel=\"nofollow\">أقوى رتويت</a>"

            _twittTextLabel.Text = _twitt.text;

            _twittDateLabel.Text = _twitt.GetDate();
            _twittDateLabel.SizeToFit();
        }
예제 #2
0
 public void UpdatedImage(Uri uri)
 {
     if (uri.OriginalString == _twitt.user.GetBigProfileImageUrl())
     {
         var image = ImageLoader.DefaultRequestImage(new Uri(_twitt.user.GetBigProfileImageUrl()), this);
         _avatarCG = image.CGImage;
         CGImage imgWithMaskCG = _avatarCG.WithMask(_mask);
         _userMaskImageView.Image = new UIImage(imgWithMaskCG);
         //_userMaskImageView.SizeToFit ();
     }
 }