Beispiel #1
0
        private IList <Comment> ConvertList(IList comments, eCommentStatus statusToExclude)
        {
            List <Comment> result = new List <Comment>();

            foreach (Comment c in comments)
            {
                if (statusToExclude != c.CommentStatus)
                {
                    result.Add(c);
                }
            }
            return(result);
        }
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            eCommentStatus status = (eCommentStatus)value;

            switch (status)
            {
            case eCommentStatus.approve:
                return(ApproveBrush);

            case eCommentStatus.hold:
                return(UnapproveBrush);

            case eCommentStatus.spam:
                return(SpamBrush);

            default:
                return(ApproveBrush);
            }
        }
 private IList<Comment> ConvertList(IList comments, eCommentStatus statusToExclude)
 {
     List<Comment> result = new List<Comment>();
     foreach (Comment c in comments)
     {
         if (statusToExclude != c.CommentStatus)
         {
             result.Add(c);
         }
     }
     return result;
 }