private void editBookToolStripMenuItemMainManu_Click(object sender, EventArgs e) { EditBookForm newForm = new EditBookForm(); newForm.StartPosition = FormStartPosition.CenterScreen; newForm.ShowDialog(); }
private void butnEdit_Click(object sender, EventArgs e) { EditBookForm frm1 = new EditBookForm() { Dock = DockStyle.Fill, TopLevel = false, TopMost = true }; showpnl(frm1); frm1.Show(); }
private void EditButton_Click(object sender, EventArgs e) { if (BooksListBox.CheckedItems.Count == 0) { return; } var selected = BooksListBox.SelectedItem.ToString(); var editSelectedBook = new EditBookForm(selected); editSelectedBook.ShowDialog(); RefreshBooksListBox(); }
private void btn_edit_book_Click(object sender, EventArgs e) { if (selectedRow >= books_grid_view.Rows.Count - 1) { return; } if (selectedRow >= 0) { var book = DataBaseManager.Instance.GetBookWithID(bookList[selectedRow].ID); if (book != null) { EditBookForm editBookForm = new EditBookForm(book); Program.SwitchMainForm(editBookForm); } else { MessageBox.Show("Something went wrong with editing this book."); } } }
private void editButton_Click(object sender, EventArgs e) { if (entryList.SelectedItems.Count == 0) { return; } var entity = (entryList.SelectedItems[0] as EntryListViewItem).Entry; if (entity != null) { Form form = null; if (entity.Type == EntryType.Movie) { form = new EditMovieForm(m_context, entity); } else if (entity.Type == EntryType.Book) { form = new EditBookForm(m_context, entity); } if (form != null) { form.Location = Location; form.StartPosition = FormStartPosition.Manual; form.Show(); AddFormManager.AddForm(form, delegate { RefreshListItems(); Show(); } ); Hide(); } } }