コード例 #1
0
        private void PublishCommentSkinProperties(TraktComment comment)
        {
            if (comment == null)
            {
                return;
            }

            GUICommon.SetUserProperties(comment.User);
            GUICommon.SetCommentProperties(comment, IsWatched);
        }
コード例 #2
0
        private void PublishCommentSkinProperties(TraktCommentItem item)
        {
            if (item == null || item.Comment == null)
            {
                return;
            }

            // set shout/review properties
            GUICommon.SetCommentProperties(item.Comment, item.IsWatched());

            // set user properties
            GUICommon.SetUserProperties(item.Comment.User);

            // set movie, show, season, episode or list properties
            // set show and episode properties for episode comments
            // set show and season for season comments
            if (item.Movie != null)
            {
                GUICommon.SetMovieProperties(item.Movie);
            }
            else if (item.Show != null)
            {
                GUICommon.SetShowProperties(item.Show);
                if (item.Season != null)
                {
                    GUICommon.SetSeasonProperties(item.Show, item.Season);
                }
                if (item.Episode != null)
                {
                    GUICommon.SetEpisodeProperties(item.Show, item.Episode);
                }
            }
            else if (item.List != null)
            {
                GUICommon.SetListProperties(item.List, CurrentUser);
            }
        }