/// <summary> /// 查看书籍 /// </summary> private void CheckBooks_Click(object sender, RoutedEventArgs e) { int Newid = Convert.ToInt32(((MenuItem)sender).Tag); Book book = DataFetch.GetBook(Newid); UI.DetailsPage dp = new UI.DetailsPage(book, this, config); dp.Show(); this.Visibility = Visibility.Hidden; }
/// <summary> /// 双击事件 /// </summary> private void SearchList_MouseDoubleClick(object sender, MouseButtonEventArgs e) { Book book = SearchList.SelectedItem as Book; if (book != null && book is Book) { UI.DetailsPage ud = new UI.DetailsPage(book, this, config); ud.Show(); this.Visibility = Visibility.Hidden; } }
/// <summary> /// 查看详情 /// </summary> private void ViewDetails_Click(object sender, RoutedEventArgs e) { Book book = SearchList.SelectedItem as Book; if (book != null && book is Book) { UI.DetailsPage ud = new UI.DetailsPage(book, this, config); ud.Show(); this.Visibility = Visibility.Collapsed; } }