Esempio n. 1
0
        private void AddEntity(EntityData entityData)
        {
            if (FormDetails.EntityDataManager.EntityData.ContainsKey(entityData.EntityName))
            {
                DialogResult result = MessageBox.Show(
                    entityData.EntityName + " already exists.  Do you want to overwrite it?",
                    "Existing Character Class",
                    MessageBoxButtons.YesNo);

                if (result == DialogResult.No)
                    return;

                FormDetails.EntityDataManager.EntityData[entityData.EntityName] = entityData;

                FillListBox();
                return;
            }

            lbDetails.Items.Add(entityData.ToString());

            FormDetails.EntityDataManager.EntityData.Add(entityData.EntityName, entityData);
        }