//===================================================================== /// <summary> /// This is used to update the controls with the current property values /// </summary> /// <param name="optionsPage">The options page</param> public void SetValues(SandcastleBuilderOptionsPage optionsPage) { txtHxSViewerPath.Text = optionsPage.HxsViewerPath; txtMSHelpViewerPath.Text = optionsPage.MSHelpViewerPath; udcASPNetDevServerPort.Value = optionsPage.AspNetDevelopmentServerPort; chkVerboseLogging.Checked = optionsPage.VerboseLogging; chkOpenLogViewerOnFailure.Checked = optionsPage.OpenLogViewerOnFailedBuild; chkOpenHelpAfterBuild.Checked = optionsPage.OpenHelpAfterBuild; chkUseExternalBrowser.Checked = optionsPage.UseExternalWebBrowser; // MEF provider options are stored separately to avoid loading the entire package just to access // these options. MefProviderOptions mefProviderOptions = GetMefProviderOptions(optionsPage.Site); chkEnableExtendedXmlComments.Checked = mefProviderOptions.EnableExtendedXmlCommentsCompletion; chkEnableGoToDefinition.Checked = mefProviderOptions.EnableGoToDefinition; chkEnableGoToDefinitionInCRef.Checked = mefProviderOptions.EnableGoToDefinitionInCRef; }
/// <summary> /// This is called by the owning dialog page to validate the values and apply changes to the properties /// </summary> /// <param name="optionsPage">The options page</param> public void ApplyChanges(SandcastleBuilderOptionsPage optionsPage) { if (this.IsValid) { optionsPage.HxsViewerPath = txtHxSViewerPath.Text; optionsPage.MSHelpViewerPath = txtMSHelpViewerPath.Text; optionsPage.AspNetDevelopmentServerPort = (int)udcASPNetDevServerPort.Value; optionsPage.VerboseLogging = chkVerboseLogging.Checked; optionsPage.OpenLogViewerOnFailedBuild = chkOpenLogViewerOnFailure.Checked; optionsPage.OpenHelpAfterBuild = chkOpenHelpAfterBuild.Checked; optionsPage.UseExternalWebBrowser = chkUseExternalBrowser.Checked; // MEF provider options are stored separately to avoid loading the entire package just to access // these options. MefProviderOptions mefProviderOptions = GetMefProviderOptions(optionsPage.Site); mefProviderOptions.EnableExtendedXmlCommentsCompletion = chkEnableExtendedXmlComments.Checked; mefProviderOptions.EnableGoToDefinition = chkEnableGoToDefinition.Checked; mefProviderOptions.EnableGoToDefinitionInCRef = chkEnableGoToDefinitionInCRef.Checked; mefProviderOptions.SaveConfiguration(); } }
/// <summary> /// This is called by the owning dialog page to validate the values and apply changes to the properties /// </summary> /// <param name="optionsPage">The options page</param> public void ApplyChanges(SandcastleBuilderOptionsPage optionsPage) { if(this.IsValid) { optionsPage.HxsViewerPath = txtHxSViewerPath.Text; optionsPage.MSHelpViewerPath = txtMSHelpViewerPath.Text; optionsPage.AspNetDevelopmentServerPort = (int)udcASPNetDevServerPort.Value; optionsPage.VerboseLogging = chkVerboseLogging.Checked; optionsPage.OpenLogViewerOnFailedBuild = chkOpenLogViewerOnFailure.Checked; optionsPage.OpenHelpAfterBuild = chkOpenHelpAfterBuild.Checked; optionsPage.UseExternalWebBrowser = chkUseExternalBrowser.Checked; // MEF provider options are stored separately to avoid loading the entire package just to access // these options. MefProviderOptions mefProviderOptions = GetMefProviderOptions(optionsPage.Site); mefProviderOptions.EnableExtendedXmlCommentsCompletion = chkEnableExtendedXmlComments.Checked; mefProviderOptions.EnableGoToDefinition = chkEnableGoToDefinition.Checked; mefProviderOptions.EnableGoToDefinitionInCRef = chkEnableGoToDefinitionInCRef.Checked; mefProviderOptions.SaveConfiguration(); } }