Beispiel #1
0
 internal void Update(Dtos.Comment updated)
 {
     comment = updated;
     RaisePropertyChanged("Text");
     RaisePropertyChanged("Votes");
     RaisePropertyChanged("VotesString");
     RaisePropertyChanged("UserScore");
     RaisePropertyChanged("UserScoreString");
     RaisePropertyChanged("Voted");
 }
Beispiel #2
0
        public Comment(Dtos.Comment comment) : base(FeedItemType.Comment, comment.CreatedTime)
        {
            this.comment = comment;
            DateTime dt = Utilities.FromUnixTime(comment.CreatedTime);

            CreateTime = dt.ToLocalTime().ToString("M/d/yyyy h:mm tt");
            CanAnimate = Visibility.Collapsed;

            if (comment.Image != null)
            {
                Action <ImageSource, Visibility> cb = (img, vis) =>
                {
                    Picture    = img;
                    CanAnimate = vis;
                };

                Thread th = new Thread(() => LoadImage(comment.Image, cb));
                th.Start();
            }
        }