public static void EditItem(ProItemModel model) { ItemModel m = ItemBusiness.GetItemByName(model.Name, model.Type); editItem = new ItemEditor(EditorMode.EditItem, m); editItem.ShowDialog(); }
private void addItemButton_Click(object sender, EventArgs e) { ItemEditor editor = new ItemEditor(); if (editor.ShowDialog() == DialogResult.OK) { Scene scene = this.GetThisScene(); scene.Items.Add(editor.Item); this.RefreshItemsListBox(); } }
private void editItemButton_Click(object sender, EventArgs e) { Item item = this.itemsListBox.SelectedItem as Item; if (item != null) { ItemEditor editor = new ItemEditor(item); if (editor.ShowDialog() == DialogResult.OK) { item = editor.Item; this.RefreshItemsListBox(); } } }
public static void NewItem(bool isFavorite = false) { newItem = new ItemEditor(EditorMode.NewItem); newItem.checkBoxFavorite.Checked = isFavorite; newItem.ShowDialog(); }