コード例 #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
        private void MainWindow_MdiChildActivate(object sender, EventArgs e)
        {
            BookView bw = (BookView)ActiveMdiChild;

            if (bw == null)
            {
                return;
            }
            dontFilterMark = (bw.Filter != (FilterType)filterBox.SelectedIndex);
            bw.activated();
        }
コード例 #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();
        }