Esempio n. 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();
        }
Esempio n. 2
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();
        }
Esempio n. 3
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();
        }