/// <inheritdoc /> protected override bool BindControlValue(Control control) { SandcastleProject currentProject = null; string[] searchFolders; if (loadingInfo) { return(true); } #if !STANDALONEGUI if (this.ProjectMgr != null) { currentProject = ((SandcastleBuilderProjectNode)this.ProjectMgr).SandcastleProject; } #else currentProject = this.CurrentProject; #endif if (currentProject == null) { tvArguments.Nodes.Clear(); } else { searchFolders = new[] { currentProject.ComponentPath, Path.GetDirectoryName(currentProject.Filename) }; if (componentCache == null) { componentCache = ComponentCache.CreateComponentCache(currentProject.Filename); componentCache.ComponentContainerLoaded += componentCache_ComponentContainerLoaded; componentCache.ComponentContainerLoadFailed += componentCache_ComponentContainerLoadFailed; componentCache.ComponentContainerReset += componentCache_ComponentContainerReset; } if (componentCache.LoadComponentContainer(searchFolders)) { this.componentCache_ComponentContainerLoaded(this, EventArgs.Empty); } else { this.componentCache_ComponentContainerReset(this, EventArgs.Empty); } } return(true); }
/// <inheritdoc /> protected override bool BindControlValue(Control control) { SandcastleProject currentProject = null; ProjectProperty projProp = null; string[] searchFolders; #if !STANDALONEGUI if (this.ProjectMgr == null) { return(false); } #else if (this.CurrentProject == null) { return(false); } #endif // Add the project's selected language to the list if it is not there if (control.Name == "cboLanguage") { #if !STANDALONEGUI projProp = this.ProjectMgr.BuildProject.GetProperty("Language"); #else projProp = this.CurrentProject.MSBuildProject.GetProperty("Language"); #endif if (projProp != null) { cboLanguage.SelectedItem = this.AddLanguage(projProp.UnevaluatedValue ?? "en-US"); } else { cboLanguage.SelectedItem = LanguageResourceConverter.StandardValues.First( c => c.Name.Equals("en-US", StringComparison.OrdinalIgnoreCase)); } return(true); } // Load the presentation styles and syntax filters if (control.Name == "cblSyntaxFilters") { #if !STANDALONEGUI currentProject = ((SandcastleBuilderProjectNode)this.ProjectMgr).SandcastleProject; #else currentProject = this.CurrentProject; #endif searchFolders = new[] { currentProject.ComponentPath, Path.GetDirectoryName(currentProject.Filename) }; if (componentCache == null) { componentCache = ComponentCache.CreateComponentCache(currentProject.Filename); componentCache.ComponentContainerLoaded += componentCache_ComponentContainerLoaded; componentCache.ComponentContainerLoadFailed += componentCache_ComponentContainerLoadFailed; componentCache.ComponentContainerReset += componentCache_ComponentContainerReset; } if (componentCache.LoadComponentContainer(searchFolders)) { this.componentCache_ComponentContainerLoaded(this, EventArgs.Empty); } else { this.componentCache_ComponentContainerReset(this, EventArgs.Empty); } return(true); } if (control.Name == "cboPresentationStyle") { return(true); } return(false); }
/// <inheritdoc /> protected override bool BindControlValue(Control control) { SandcastleProject currentProject = null; ProjectProperty projProp = null; string[] searchFolders; #if !STANDALONEGUI if(this.ProjectMgr == null) return false; #else if(this.CurrentProject == null) return false; #endif // Add the project's selected language to the list if it is not there if(control.Name == "cboLanguage") { #if !STANDALONEGUI projProp = this.ProjectMgr.BuildProject.GetProperty("Language"); #else projProp = this.CurrentProject.MSBuildProject.GetProperty("Language"); #endif if(projProp != null) cboLanguage.SelectedItem = this.AddLanguage(projProp.UnevaluatedValue ?? "en-US"); else cboLanguage.SelectedItem = LanguageResourceConverter.StandardValues.First( c => c.Name.Equals("en-US", StringComparison.OrdinalIgnoreCase)); return true; } // Load the presentation styles and syntax filters if(control.Name == "cblSyntaxFilters") { #if !STANDALONEGUI currentProject = ((SandcastleBuilderProjectNode)this.ProjectMgr).SandcastleProject; #else currentProject = this.CurrentProject; #endif searchFolders = new[] { currentProject.ComponentPath, Path.GetDirectoryName(currentProject.Filename) }; if(componentCache == null) { componentCache = ComponentCache.CreateComponentCache(currentProject.Filename); componentCache.ComponentContainerLoaded += componentCache_ComponentContainerLoaded; componentCache.ComponentContainerLoadFailed += componentCache_ComponentContainerLoadFailed; componentCache.ComponentContainerReset += componentCache_ComponentContainerReset; } if(componentCache.LoadComponentContainer(searchFolders)) this.componentCache_ComponentContainerLoaded(this, EventArgs.Empty); else this.componentCache_ComponentContainerReset(this, EventArgs.Empty); return true; } if(control.Name == "cboPresentationStyle") return true; return false; }
//===================================================================== /// <inheritdoc /> protected override bool BindControlValue(Control control) { SandcastleProject currentProject = null; string[] searchFolders; #if !STANDALONEGUI if(this.ProjectMgr != null) currentProject = ((SandcastleBuilderProjectNode)this.ProjectMgr).SandcastleProject; #else currentProject = this.CurrentProject; #endif if(currentProject == null) { lbProjectPlugIns.Items.Clear(); gbProjectAddIns.Enabled = false; } else { searchFolders = new[] { currentProject.ComponentPath, Path.GetDirectoryName(currentProject.Filename) }; if(componentCache == null) { componentCache = ComponentCache.CreateComponentCache(currentProject.Filename); componentCache.ComponentContainerLoaded += componentCache_ComponentContainerLoaded; componentCache.ComponentContainerLoadFailed += componentCache_ComponentContainerLoadFailed; componentCache.ComponentContainerReset += componentCache_ComponentContainerReset; } if(componentCache.LoadComponentContainer(searchFolders)) this.componentCache_ComponentContainerLoaded(this, EventArgs.Empty); else this.componentCache_ComponentContainerReset(this, EventArgs.Empty); } return true; }