private void NewItemProcess() { ItemWindow itemWindow = new ItemWindow(); if (itemWindow.ShowDialog() == DialogResult.OK) { Item i = itemWindow.Item; manager.AddItem(i); listViewItems.Items.Add(CreateLVIFromItem(i)); listViewItems.Sort(); FilterLVI(); ChangesSaved(false); } }
private void EditItemProcess() { ItemWindow itemWindow = new ItemWindow(); Item oldSelected = (Item)listViewItems.SelectedItems[0].Tag; itemWindow.Item = oldSelected; itemWindow.InitControlsByItem(); if (itemWindow.ShowDialog() == DialogResult.OK) { Item i = itemWindow.Item; manager.EditItem(i); EditItemInListView(i); FilterLVI(); ChangesSaved(false); } }