示例#1
0
        internal static ListItem CreateFromHighlight(ChannelData info, string user, string text)
        {
            ListItem item = new ListItem();

            item.User           = user + ":";
            item.UserVisibility = Visibility.Visible;
            item.UserColor      = info.IsModerator(user) ? Brushes.Red : Brushes.Blue;
            item.UserWeight     = FontWeights.Bold;

            item.Message           = text;
            item.MessageVisibility = Visibility.Visible;
            item.MessageColor      = Brushes.Black;
            item.MessageWeight     = FontWeights.Bold;

            item.SubscriberIcon = info.IsSubscriber(user) ? Visibility.Visible : Visibility.Collapsed;
            item.Type           = ListItemType.ImportantQuestion;
            return(item);
        }
        internal static ListItem CreateFromQuestion(ChannelData info, string user, string text)
        {
            ListItem item = new ListItem();
            item.User = user + ":";
            item.UserVisibility = Visibility.Visible;
            item.UserColor = info.IsModerator(user) ? Brushes.Red : Brushes.Blue;
            item.UserWeight = FontWeights.Normal;

            item.Message = text;
            item.MessageVisibility = Visibility.Visible;
            item.MessageColor = Brushes.Black;
            item.MessageWeight = FontWeights.Normal;

            item.SubscriberIcon = info.IsSubscriber(user) ? Visibility.Visible : Visibility.Collapsed;
            item.Type = ListItemType.Question;

            return item;
        }