예제 #1
0
        public void modifyBook()
        {
            BookView bw = (BookView)ActiveMdiChild;

            if (bw == null)
            {
                return;
            }
            Book toMod = bw.getCurrentlySelected();

            if (toMod == null)
            {
                return;
            }

            BookDetailsWindow bd = new BookDetailsWindow(toMod);

            bd.ShowDialog();
            if (bd.IsBookAccepted)
            {
                bd.fillBook(toMod);
                currentDocument.updateBook(toMod);
            }

            bw.activated();
        }
예제 #2
0
 public void fillBooks(BookView view)
 {
     foreach (Book book in books)
     {
         view.addBook(book);
     }
 }
예제 #3
0
 public bool removeView(BookView bw)
 {
     if (views.Count > 1)
     {
         views.Remove(bw);
         return true;
     }
     return false;
 }
예제 #4
0
 public bool removeView(BookView bw)
 {
     if (views.Count > 1)
     {
         views.Remove(bw);
         return(true);
     }
     return(false);
 }
예제 #5
0
        private void MainWindow_MdiChildActivate(object sender, EventArgs e)
        {
            BookView bw = (BookView)ActiveMdiChild;

            if (bw == null)
            {
                return;
            }
            dontFilterMark = (bw.Filter != (FilterType)filterBox.SelectedIndex);
            bw.activated();
        }
예제 #6
0
        private void filterBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (dontFilterMark == true)
            {
                dontFilterMark = false;
                return;
            }
            BookView bw = (BookView)ActiveMdiChild;

            if (bw == null)
            {
                return;
            }
            bw.filterItems((FilterType)filterBox.SelectedIndex);
        }
예제 #7
0
        public void removeBook()
        {
            BookView bw = (BookView)ActiveMdiChild;

            if (bw == null)
            {
                return;
            }
            Book toRm = bw.getCurrentlySelected();

            if (toRm == null)
            {
                return;
            }
            currentDocument.removeBook(toRm);

            bw.activated();
        }
예제 #8
0
 public void fillBooks(BookView view)
 {
     currentDocument.fillBooks(view);
 }
예제 #9
0
 public bool removeView(BookView bw)
 {
     return(currentDocument.removeView(bw));
 }
예제 #10
0
 public void fillBooks(BookView view)
 {
     foreach (Book book in books)
         view.addBook(book);
 }
예제 #11
0
 public void addView(BookView bv)
 {
     views.Add(bv);
 }
예제 #12
0
 public void addView(BookView bv)
 {
     views.Add(bv);
 }