Ejemplo n.º 1
0
        private void DataAdd()
        {
            EnchantData        enchantData        = new EnchantData();
            EnchantSettingForm enchantSettingForm = new EnchantSettingForm(enchantData);

            if (enchantSettingForm.ShowDialog() == DialogResult.OK)
            {
                enchantListBox.Items.Add(enchantData);
            }
        }
Ejemplo n.º 2
0
        private void DataChange()
        {
            var selectedItem = (EnchantData)enchantListBox.SelectedItem;
            int selectIndex  = enchantListBox.SelectedIndex;
            EnchantSettingForm enchantSettingForm = new EnchantSettingForm(selectedItem);

            if (enchantSettingForm.ShowDialog() == DialogResult.OK)
            {
                enchantListBox.Items.RemoveAt(selectIndex);
                enchantListBox.Items.Add(selectedItem);
            }
        }