private void save(bool closeAfterSave) { var groupIDForTag = AdminProxy.GetGroupIDForTag(txtTag.Text); //if (String.IsNullOrEmpty(txtTag.Text)){ // MessageBox.Show(this, "You must specify a tag for the group.", "Tag Required"); // txtTag.Focus(); // return; //} else if (groupIDForTag > -1 && groupIDForTag != ID) { // MessageBox.Show(this, "You must specify a unique tag for the group.\n" + txtTag.Text + " is already taken.", "Unique Tag Required"); // txtTag.Focus(); // txtTag.SelectAll(); // return; //} if (AdminProxy.IsReservedGroupTagValue(txtTag.Text) && txtTag.Enabled) { MessageBox.Show(this, getDisplayMember("save{reservedtag_body}", "{0} is a reserved tag name and cannot be used.\nPlease specify a different value.", txtTag.Text), getDisplayMember("save{reservedtag_body}", "Reserved Tag")); return; } ID = AdminProxy.SaveGroup(ID, txtTag.Text, txtName.Text, txtDescription.Text); RefreshData(); MainFormUpdateStatus(getDisplayMember("save{done}", "Saved group {0}", txtName.Text), true); if (closeAfterSave) { if (Modal) { this.DialogResult = DialogResult.OK; this.Close(); } else { MainFormSelectParentTreeNode(); } } }