Esempio n. 1
0
 private void Page_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     if (Config.IsPageSwitched(e.PreviousSize, e.NewSize) && !string.IsNullOrEmpty(ViewModelBase.CurrentStoryId))
     {
         MainContentFrame.Navigate(typeof(MainContentPage));
         CommentFrame.Navigate(typeof(CommentPage));
     }
 }
Esempio n. 2
0
 public HomePage()
 {
     this.InitializeComponent();
     instance = this;
     MyFeedbackListView.ItemsSource = feedbacks;
     CommentFrame.Navigate(typeof(CommentPage), new Feedback());
     commentPage = CommentFrame.Content as CommentPage;
     commentPage.BackButton.Click += BackButton_Click;
 }
Esempio n. 3
0
 private void DisplayStory(string storyId)
 {
     ViewModelBase.CurrentStoryId = storyId;
     if (Config.UIStatus == AppUIStatus.All || Config.UIStatus == AppUIStatus.ListAndContent)
     {
         MainContentFrame.Navigate(typeof(MainContentPage), storyId);
         CommentFrame.Navigate(typeof(CommentPage), storyId);
     }
     else
     {
         ((Frame)Window.Current.Content).Navigate(typeof(MainContentPage), storyId);
     }
 }
 public ChannelFeedbackPage()
 {
     this.InitializeComponent();
     FBFormControl.SendBtn.Click       += SendBtn_Click;
     FBFormControl.BackBtn.Click       += BackBtn_Click;
     FBFormControl.AddImageBtn.Click   += AddImageBtn_Click;
     FBFormControl.ShowPanel.Completed += ShowPanel_Completed;
     CommentFrame.Navigate(typeof(CommentPage), new Feedback());
     commentPage = CommentFrame.Content as CommentPage;
     commentPage.BackButton.Click += BackButton_Click;
     SendFeedbackForm.Completed   += SendFeedbackForm_Completed;
     ShowFeedbackForm.Completed   += ShowFeedbackForm_Completed;
     HideFeedbackForm.Completed   += HideFeedbackForm_Completed;
 }
Esempio n. 5
0
        private void DisplayStory(string storyId)
        {
            ViewModelBase.CurrentStoryId = storyId;
            if (Config.UIStatus == AppUIStatus.All || Config.UIStatus == AppUIStatus.ListAndContent)
            {
                MainContentFrame.Navigate(typeof(MainContentPage), storyId);
                CommentFrame.Navigate(typeof(CommentPage), storyId);
            }
            else
            {
                Frame rootFrame = App.GetWindowFrame();
                if (rootFrame == null)
                {
                    return;
                }

                rootFrame.Navigate(typeof(MainContentPage), storyId);
            }
        }
Esempio n. 6
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            if (e.NavigationMode == NavigationMode.New)
            {
                Model = e.Parameter as InfoBindingModel;
                if (Model != null)
                {
                    MainTitle.Text = WebUtility.HtmlDecode(Model.title);
                    SubHeader.Text = WebUtility.HtmlDecode(Model.SubHeader);
                    SetContent(Model.article.content);
                    CommentFrame.Navigate(typeof(CommentPage), Model.contentId);
                    Comment.Instance.QuoteId = -1;
                }
                Comment.Instance.QuoteFloorChanged += QuoteFloorChanged;

                FavoriteButtonRef(true);
            }
        }
Esempio n. 7
0
        private void hbComment_Click(object sender, RoutedEventArgs e)
        {
            MiniModeWindows();
            AddPanel((int)Globals.Panels.CommentPanel);
            ConfigurationSettings.UserCommentClose = false;

            if (Globals.CommentCount != "0")
            {
                //btCommentCount.Content = "0";
                //commentPanel.MessageCount = "0";

                if (CommentFrame.CurrentSource == null)
                {
                    CommentFrame.Navigate(new Uri(String.Format("/UserComment"), UriKind.Relative));
                }
                else
                {
                    CommentFrame.Refresh();
                }
            }
        }
Esempio n. 8
0
 private void FBListView_ItemClick(object sender, ItemClickEventArgs e)
 {
     CommentBlade.IsOpen = true;
     CommentFrame.Navigate(typeof(CommentPage), e.ClickedItem as Feedback);
 }