private void moreDetailsButton_Click(object sender, RoutedEventArgs e) { if (this.Tag != null) { mw.homePage.Children.Clear(); mw.hideOrUnhideAll(1); usrCtrl_addNews aN = new usrCtrl_addNews(mw, dbConn); aN.name.Text = mw.newsClassList[Convert.ToInt32(this.Tag)].getName(); aN.text.Text = mw.newsClassList[Convert.ToInt32(this.Tag)].getText(); aN.text.IsEnabled = false; aN.name.IsEnabled = false; aN.addEditButton.Visibility = Visibility.Hidden; aN.Tag = this.Tag; mw.homePage.Children.Add(aN); } }
////////////////////////////////////////////////////////////////////////////////////////// private void addNewsButton_Click(object sender, RoutedEventArgs e) { homePage.Children.Clear(); hideOrUnhideAll(1); usrCtrl_addNews aN = new usrCtrl_addNews(this, dbConn); aN.addEditButton.Content = "Add"; homePage.Children.Add(aN); }