Beispiel #1
0
        /// <summary>
        /// This method is used by the Sandcastle Help File Builder to let the
        /// plug-in perform its own configuration.
        /// </summary>
        /// <param name="project">A reference to the active project</param>
        /// <param name="currentConfig">The current configuration XML fragment</param>
        /// <returns>A string containing the new configuration XML fragment</returns>
        /// <remarks>The configuration data will be stored in the help file
        /// builder project.</remarks>
        public string ConfigurePlugIn(SandcastleProject project, string currentConfig)
        {
            var configuration = XsdPlugInConfiguration.FromXml(project, currentConfig);

            using (var dlg = new XsdConfigurationForm(configuration))
            {
                return((dlg.ShowDialog() == DialogResult.OK)
                        ? XsdPlugInConfiguration.ToXml(dlg.NewConfiguration)
                        : currentConfig);
            }
        }
Beispiel #2
0
 /// <summary>
 /// This method is used to initialize the plug-in at the start of the
 /// build process.
 /// </summary>
 /// <param name="buildProcess">A reference to the current build
 /// process.</param>
 /// <param name="configuration">The configuration data that the plug-in
 /// should use to initialize itself.</param>
 public void Initialize(BuildProcess buildProcess, XPathNavigator configuration)
 {
     _configuration = XsdPlugInConfiguration.FromXml(buildProcess.CurrentProject, configuration);
     _buildProcess  = buildProcess;
     _buildProcess.ReportProgress(Resources.PlugInVersionFormatted, Resources.PlugInName, XsdDocMetadata.Version, XsdDocMetadata.Copyright);
 }