Ejemplo n.º 1
0
        private void addBook_Click(object sender, EventArgs e)
        {
            NewBookForm newBook = new NewBookForm(books);

            newBook.Show();
            newBook.FormClosing += HandleNewBook;
        }
Ejemplo n.º 2
0
        //新书入库菜单
        private void NewBook(object sender, EventArgs e)
        {
            NewBookForm fnb = new NewBookForm();

            fnb.MdiParent     = this;
            fnb.StartPosition = FormStartPosition.CenterScreen;
            fnb.WindowState   = FormWindowState.Maximized;
            fnb.Show();
        }
Ejemplo n.º 3
0
        private void btn_NewBook_Click(object sender, EventArgs e)
        {
            var form = new NewBookForm(_bookService, _authorService);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                MetroMessageBox.Show(this, string.Format("{0} was successfully added to the list of books", form.NewBookTitle), "Success", MessageBoxButtons.OK, MessageBoxIcon.Question);
            }
        }