/// <summary> /// 立即阅读 /// </summary> private void Read_Click(object sender, RoutedEventArgs e) { ReadingPage rp = new ReadingPage(book, mainWindow, config); rp.Show(); //加入这一步,防止主界面可见度为真 WindowsShow = true; this.Close(); }
/// <summary> /// 阅读书籍 /// </summary> private void Read_Click(object sender, RoutedEventArgs e) { int Newid = Convert.ToInt32(((MenuItem)sender).Tag); Book book = DataFetch.GetBook(Newid); UI.ReadingPage page = new UI.ReadingPage(book, this, config); page.Show(); this.Visibility = Visibility.Hidden; }
/// <summary> /// 查看目录 /// </summary> private void Catalog_Click(object sender, RoutedEventArgs e) { ReadingPage rp = new ReadingPage(book, mainWindow, config); //rp.NewListView.Visibility = Visibility.Visible; rp.ListShow(); rp.Show(); //加入这一步,防止主界面可见度为真 WindowsShow = true; this.Close(); }
/// <summary> /// 点击打开阅读页 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void NewBook_MouseDown(object sender, MouseButtonEventArgs e) { if (e.ChangedButton == MouseButton.Left && e.ClickCount == 2) { int Newid = Convert.ToInt32(((Grid)sender).Tag); Book book = DataFetch.GetBook(Newid); UI.ReadingPage page = new UI.ReadingPage(book, this, config); page.Show(); this.Visibility = Visibility.Collapsed; } }
/// <summary> /// 立即阅读 /// </summary> private void Read_Click_1(object sender, RoutedEventArgs e) { Book book = SearchList.SelectedItem as Book; if (book != null && book is Book) { UI.ReadingPage rp = new UI.ReadingPage(book, this, config); rp.Show(); this.Visibility = Visibility.Hidden; } }