//===================================================================== /// <summary> /// This method can be overridden to let configuration tools allow the user to edit the component /// configuration. /// </summary> /// <param name="currentConfiguration">A string containing the current configuration XML fragment</param> /// <param name="container">A composition container that holds all of the exported components found /// by the build tool. This can be used to locate and work with other components if necessary.</param> /// <returns>A string containing the new configuration XML fragment</returns> /// <remarks>The base implementation uses a generic editor dialog that edits the XML as text</remarks> public virtual string ConfigureComponent(string currentConfiguration, CompositionContainer container) { using (var dlg = new ConfigurationEditorDlg()) { dlg.Configuration = currentConfiguration; if (dlg.ShowDialog() == DialogResult.OK) { currentConfiguration = dlg.Configuration; } } return(currentConfiguration); }
//===================================================================== /// <summary> /// This method can be overridden to let configuration tools allow the user to edit the component /// configuration. /// </summary> /// <param name="currentConfiguration">A string containing the current configuration XML fragment</param> /// <param name="container">A composition container that holds all of the exported components found /// by the build tool. This can be used to locate and work with other components if necessary.</param> /// <returns>A string containing the new configuration XML fragment</returns> /// <remarks>The base implementation uses a generic editor dialog that edits the XML as text</remarks> public virtual string ConfigureComponent(string currentConfiguration, CompositionContainer container) { var dlg = new ConfigurationEditorDlg() { Configuration = currentConfiguration }; if (dlg.ShowModalDialog() ?? false) { currentConfiguration = dlg.Configuration; } return(currentConfiguration); }