コード例 #1
0
ファイル: ReplyDialog.xaml.cs プロジェクト: rsudama/Klabr
        private void AddReply(SPTopic reply)
        {
            string htmlReply = reply.Body;
            Debug.WriteLine(htmlReply);

            // increase the default font size
            htmlReply = htmlReply.Replace(";font-size:12;", ";font-size:18;");
            Debug.WriteLine(htmlReply);

            RichTextEditor richTextEditor = new RichTextEditor(htmlReply, false);
            // TODO: set font size from user settings

            Label headerLabel = new Label();
            headerLabel.Content = string.Format("{0} wrote {1}", reply.Author, reply.Created);
            headerLabel.FontStyle = FontStyles.Italic;
            headerLabel.FontSize = 12;

            Expander replyExpander = new Expander();
            replyExpander.Header = headerLabel;
            replyExpander.Content = richTextEditor;
            replyExpander.IsExpanded = expander.IsExpanded;

            if (reply.LastModified > reply.LastViewed)
            {
                Label label = (Label)replyExpander.Header;
                label.FontWeight = FontWeights.Bold;
            }

            repliesListView.Children.Add(replyExpander);
        }
コード例 #2
0
ファイル: ReplyDialog.xaml.cs プロジェクト: rsudama/Klabr
        public ReplyDialog(SPDiscussion discussion, SPTopic topic)
            : this()
        {
            _discussion = discussion;
            _topic = topic;

            Title = string.Format("Klabr - {0} : {1}", discussion.Title, topic.Title);
            UpdateReplies();
        }
コード例 #3
0
ファイル: AlertBox.xaml.cs プロジェクト: rsudama/Klabr
        public AlertBox(string title, List<SPDiscussion> subscribedDiscussions, SPDiscussion discussion, SPTopic topic)
        {
            InitializeComponent();

            _discussion = discussion;
            _topic = topic;

            header.Content = title;
            //text.Text = "Discussion '" + discussion.Title + "', Topic '" + _topic.Title + "' has been modified";
            text.Text = string.Format("Discussion '{0}', Topic '{1}' has been modified", discussion.Title, _topic.Title);

            // Set up the fade in and fade out animations
            _fadeInAnimation = new DoubleAnimation();
            _fadeInAnimation.From = 0;
            _fadeInAnimation.To = 0.8;
            _fadeInAnimation.Duration = new Duration(TimeSpan.Parse("0:0:1.5"));

            // For the fade out we omit the from, so that it can be smoothly initiated
            // from a fade in that gets interrupted when the user wants to close the window
            _fadeOutAnimation = new DoubleAnimation();
            _fadeOutAnimation.To = 0;
            _fadeOutAnimation.Duration = new Duration(TimeSpan.Parse("0:0:1.5"));
        }