GetMessageImagePath() public static method

Возвращает путь к иконке сообщения.
public static GetMessageImagePath ( IServiceProvider provider, bool isRead, bool isMarked, bool isArticle, PenaltyType violationPenaltyType = PenaltyType.Ban, string violationReason = null ) : string
provider IServiceProvider
isRead bool Сообщение прочитано
isMarked bool Помечено ли сообщение флагом (очками).
isArticle bool Является ли сообщение статьей.
violationPenaltyType PenaltyType Тип бана
violationReason string Основание для бана
return string
Beispiel #1
0
        private string FormatSubject()
        {
            var text = HttpUtility.HtmlEncode(_subjectTextBox.Text);

            return(string.Format(_templateHeaderItem,
                                 JanusFormatMessage.GetMessageImagePath(_serviceManager, true, false, false),
                                 string.Format(_templateAlt, SR.TGColumnSubject, text),
                                 text));
        }
 public string GetMessageImagePath(
     bool isRead,
     bool isMarked,
     bool isArticle,
     int violationPenaltyType,
     string violationReason)
 {
     return(JanusFormatMessage
            .GetMessageImagePath(_serviceProvider, isRead, isMarked, isArticle, (PenaltyType)violationPenaltyType, violationReason));
 }
Beispiel #3
0
        private string FormatSubject(
            int messageId,
            string subject,
            bool isRead,
            bool isMarked,
            int?articleId,
            bool anchor)
        {
            var text = HttpUtility.HtmlEncode(subject);

            return
                (string.Format(
                     anchor
                                                ? _templateHeaderItemAnchor
                                                : _templateHeaderItem,
                     JanusFormatMessage.GetMessageImagePath(
                         _serviceProvider,
                         isRead,
                         isMarked,
                         articleId > 0),
                     string.Format(_templateAlt, SR.TGColumnSubject, text),
                     text,
                     FormatUri(JanusProtocolResourceType.Message, messageId.ToString())));
        }