private void BtnModifyButton_Click(object sender, EventArgs e)
        {
            Enumerations.EnumerationItem item = GetCurrentSelectedItem();
            if (item == null)
            {
                return;
            }
            EditEnumForm dlg = new EditEnumForm(enumName, EditEnumForm.eFormType.Edit, item);

            do
            {
                DialogResult result = dlg.ShowDialog(this);
                if (result != DialogResult.OK)
                {
                    return;
                }
                if (IsUnique(dlg.enumValue, item))
                {
                    UpdateItem(dlg.enumValue, item);
                    return;
                }
                if (MessageBox.Show(Lang.Error_EnumMustBeUnique, Lang.Error, MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) != DialogResult.OK)
                {
                    return;
                }
            }while (true);
        }
 private void BtnAddButton_Click(object sender, EventArgs e)
 {
     EditEnumForm dlg = new EditEnumForm(enumName);
     do
     {
         DialogResult result = dlg.ShowDialog(this);
         if (result != DialogResult.OK)
             return;
         if (IsUnique(dlg.enumValue))
         {
             AddItem(dlg.enumValue);
             return;
         }
         if (MessageBox.Show(Lang.Error_EnumMustBeUnique, Lang.Error, MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) != DialogResult.OK)
             return;
     }
     while (true);
 }
        private void BtnAddButton_Click(object sender, EventArgs e)
        {
            EditEnumForm dlg = new EditEnumForm(enumName, EditEnumForm.eFormType.New, new Enumerations.EnumerationItem {
                Id = 0, Name = "", IsDefault = false
            });

            do
            {
                DialogResult result = dlg.ShowDialog(this);
                if (result != DialogResult.OK)
                {
                    return;
                }
                if (IsUnique(dlg.enumValue))
                {
                    AddItem(dlg.enumValue);
                    return;
                }
                if (MessageBox.Show(Lang.Error_EnumMustBeUnique, Lang.Error, MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) != DialogResult.OK)
                {
                    return;
                }
            }while (true);
        }
 private void BtnModifyButton_Click(object sender, EventArgs e)
 {
     IdentifiableName item = GetCurrentSelectedItem();
     if (item == null)
         return;
     EditEnumForm dlg = new EditEnumForm(enumName, item);
     do
     {
         DialogResult result = dlg.ShowDialog(this);
         if (result != DialogResult.OK)
             return;
         if (IsUnique(dlg.enumValue, item))
         {
             UpdateItem(dlg.enumValue, item);
             return;
         }
         if (MessageBox.Show(Lang.Error_EnumMustBeUnique, Lang.Error, MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) != DialogResult.OK)
             return;
     }
     while (true);
 }