예제 #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmNPCCharacterEquipmentEditor characterEquipmentEditor = new frmNPCCharacterEquipmentEditor();

            if (characterEquipmentEditor.ShowDialog() == DialogResult.OK)
            {
                var equipment = characterEquipmentEditor.Equipment;
                equipments.Add(equipment);
                loadEquipments();
            }
        }
예제 #2
0
        private void btnModify_Click(object sender, EventArgs e)
        {
            var index = listView1.SelectedIndices[0];

            listView1.Items.RemoveAt(index);
            equipments.RemoveAt(index);

            frmNPCCharacterEquipmentEditor characterEquipmentEditor = new frmNPCCharacterEquipmentEditor();

            if (characterEquipmentEditor.ShowDialog() == DialogResult.OK)
            {
                var equipment = characterEquipmentEditor.Equipment;
                equipments.Insert(index, equipment);
                loadEquipments();
            }
        }