Пример #1
0
 void StoryPage_Loaded(object sender, RoutedEventArgs e)
 {
     CommentViewer.NavigateToString(CoreServices.Instance.AddCommentHTML(((Story)DataContext).body));
     CommentViewer.Navigating += new EventHandler <NavigatingEventArgs>(ContentText_Navigating);
     CommentFooter.Visibility  = Visibility.Visible;
     shouldStartWebBrowser     = true;
 }
Пример #2
0
 void CommentPost_Loaded(object sender, RoutedEventArgs e)
 {
     if (_reply != null)
     {
         CommentViewer.NavigateToString(CoreServices.Instance.AddCommentHTML(_reply.body));
     }
     CommentViewer.Navigating += new EventHandler <NavigatingEventArgs>(CommentViewer_Navigating);
 }
Пример #3
0
        void ThreadPage_Loaded(object sender, RoutedEventArgs e)
        {
            if (!shouldStartWebBrowser)
            {
                CommentViewer.NavigateToString("<HTML><body bgcolor='#222222'/></HTML>");
            }

            if (staticLoad)
            {
                ThreadCreated(_thread, new System.ComponentModel.PropertyChangedEventArgs("RootComment"));
            }

            CommentViewer.Navigating += new EventHandler <NavigatingEventArgs>(ContentText_Navigating);
            CoreServices.Instance.SelectedCommentChanged = SelectedCommentChanged;
        }
Пример #4
0
 private void ShowComment(Comment c)
 {
     _comment = c.id;
     CommentHeader.DataContext = c;
     CommentViewer.NavigateToString(CoreServices.Instance.AddCommentHTML(c.body));
     if (CoreServices.Instance.IsOnWatchedList(c))
     {
         _PinButton.IconUri = new Uri("/Images/sticky_notes.png", UriKind.Relative);
         _PinButton.Text    = "Unpin Thread";
     }
     else
     {
         _PinButton.IconUri = new Uri("/Images/PinIcon.png", UriKind.Relative);
         _PinButton.Text    = "Pin Thread";
     }
     shouldStartWebBrowser = true;
 }
Пример #5
0
 void detail_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
 {
     try
     {
         StoryDetail s = sender as StoryDetail;
         s.PropertyChanged     -= detail_PropertyChanged;
         ProgressBar.Visibility = Visibility.Collapsed;
         DataContext            = s.Detail;
         CommentViewer.NavigateToString(CoreServices.Instance.AddCommentHTML(s.Detail.body));
         CommentViewer.Navigating += new EventHandler <NavigatingEventArgs>(ContentText_Navigating);
         CommentFooter.Visibility  = Visibility.Visible;
         shouldStartWebBrowser     = true;
     }
     catch
     {
     }
 }