protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     string wid = "";
     if (NavigationContext.QueryString.TryGetValue("wid", out wid))
     {
         this.currentWord = App.DbViewModel.GetWord(int.Parse(wid));
         this.pageTitle.Text = this.currentWord.WordContent;
         this.listComments.ItemsSource = App.DbViewModel.GetWordComments(this.currentWord.WordId);
     }
 }
Exemple #2
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            string nid = "", wid = "";
            if (NavigationContext.QueryString.TryGetValue("nid", out nid) && NavigationContext.QueryString.TryGetValue("wid", out wid))
            {
                int wordID = int.Parse(wid);
                int nestID = int.Parse(nid);
                this.syncManager.DoGetWordCommentsInBackground(wordID);
                this.currentWord = App.DbViewModel.GetWord(wordID);
                this.pageTitle.Text = this.currentWord.WordContent;

                this.txtDescription.Text = this.currentWord.Description;

                this.lblExample.Text = AppResources.word_Example;
                this.txtExample.Text = this.currentWord.Example;

                this.lblEthimology.Text = AppResources.word_Ethimology;
                this.txtEthimology.Text = this.currentWord.Ethimology;

                this.txtURL.Visibility = System.Windows.Visibility.Visible;
                if (!this.currentWord.AddedByUrl.Trim().Equals(""))
                {
                    this.txtURL.Content = this.currentWord.AddedByUrl;
                    this.txtURL.Click += new RoutedEventHandler(txtURL_Click);
                }
                else
                    this.txtURL.Visibility = System.Windows.Visibility.Collapsed;

                this.txtEmail.Visibility = System.Windows.Visibility.Visible;
                if (!this.currentWord.AddedByEmail.Trim().Equals(""))
                {
                    this.txtEmail.Content = this.currentWord.AddedByEmail;
                    this.txtEmail.Click += new RoutedEventHandler(txtEmail_Click);
                }
                else
                    this.txtEmail.Visibility = System.Windows.Visibility.Collapsed;

                this.txtAuthorAndDate.Text = this.currentWord.AddedBy + " @ " + AppSettings.DoLongDate(this.currentWord.AddedAtDate, false, true);
            }
            else
                NavigationService.Navigate(new Uri("/Views/Newest.xaml", UriKind.Relative));
        }
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     string wid = "";
     if (NavigationContext.QueryString.TryGetValue("wid", out wid))
         this.currentWord = App.DbViewModel.GetWord(int.Parse(wid));
 }