コード例 #1
0
 public void EditBook_OnClick(object sender, RoutedEventArgs e, Book book)
 {
     EditBook editBook = new EditBook(book);
     Content.Children.Clear();
     Content.Children.Add(editBook);
     MenuToggleButton.IsChecked = true;
     MenuToggleButton.IsHitTestVisible = true;
     ToolbarName.Text = book.Name;
     AddButton.Visibility = Visibility.Hidden;
 }
コード例 #2
0
        public void ViewBook(object sender, RoutedEventArgs e, Book book)
        {
            EditBook editBook = new EditBook(book);
            Content.Children.Clear();
            Content.Children.Add(editBook);
            MenuToggleButton.IsChecked = true;
            MenuToggleButton.IsHitTestVisible = true;
            ToolbarName.Text = book.Name;

            editBook.CoverImage.IsReadOnly = true;
            editBook.Name.IsReadOnly = true;
            editBook.Description.IsReadOnly = true;
            editBook.Status.IsEnabled = false;      
            editBook.Author.IsReadOnly = true;
            editBook.Date.IsEnabled = false;
            editBook.PageCount.IsReadOnly = true;

            editBook.BrowseImage.Visibility = Visibility.Hidden;
            editBook.AddButton.Visibility = Visibility.Hidden;
            editBook.CancelButton.Visibility = Visibility.Hidden;
            AddButton.Visibility = Visibility.Hidden;
        }
コード例 #3
0
 //Update Book --------------------
 public void updateBookToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (editBook == null)
     {
         if(catalog != null) editBook = new EditBook(this, catalog.editIsbn);
         else editBook = new EditBook(this, null);
         editBook.MdiParent = this;
         editBook.Show();
     }
     else
     {
         editBook.Activate();
     }
 }