private void EditSelectedItemClick(object sender, EventArgs e) { var selectedItem = itemListView.SelectedItems[0]; var editItemForm = new EditItemForm(selectedItem); editItemForm.StartPosition = FormStartPosition.CenterParent; var result = editItemForm.ShowDialog(); if (result == DialogResult.OK) { itemListView.ForceDraw(); } }
private void OnItemAdd(Item copyOfItemToAdd) { var editItemForm = new EditItemForm(copyOfItemToAdd); editItemForm.StartPosition = FormStartPosition.CenterParent; var result = editItemForm.ShowDialog(); if (result == DialogResult.OK) { AddItemOrStackExistingOne(copyOfItemToAdd); itemListView.ForceDraw(); } }