예제 #1
0
        public static void EditItem(ProItemModel model)
        {
            ItemModel m = ItemBusiness.GetItemByName(model.Name, model.Type);

            editItem = new ItemEditor(EditorMode.EditItem, m);
            editItem.ShowDialog();
        }
예제 #2
0
        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();
            }
        }
예제 #3
0
        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();
                }
            }
        }
예제 #4
0
 public static void NewItem(bool isFavorite = false)
 {
     newItem = new ItemEditor(EditorMode.NewItem);
     newItem.checkBoxFavorite.Checked = isFavorite;
     newItem.ShowDialog();
 }