/// <summary> /// Shows the add element dialog so the user can choose one or more /// new elements to be added to the selected element. /// </summary> /// <param name="attributes">The list of elements the user /// can choose from.</param> /// <returns>The elements selected by the user.</returns> public string[] SelectNewElements(string[] elements) { using (IAddXmlNodeDialog addElementDialog = CreateAddElementDialog(elements)) { if (addElementDialog.ShowDialog() == DialogResult.OK) { return(addElementDialog.GetNames()); } return(new string[0]); } }
/// <summary> /// Shows the add attribute dialog so the user can choose one or more /// new attributes to be added to the selected element. /// </summary> /// <param name="attributes">The list of attributes the user /// can choose from.</param> /// <returns>The attributes selected by the user.</returns> public string[] SelectNewAttributes(string[] attributes) { using (IAddXmlNodeDialog addAttributeDialog = CreateAddAttributeDialog(attributes)) { if (addAttributeDialog.ShowDialog() == DialogResult.OK) { return(addAttributeDialog.GetNames()); } return(new string[0]); } }