public static OfficeViewerWrapperSettings GetConfig() { OfficeViewerWrapperSettings settings = (OfficeViewerWrapperSettings)ConfigurationBroker.GetSection("officeViewerWrapperSettings"); if (settings == null) settings = new OfficeViewerWrapperSettings(); return settings; }
public static OfficeViewerWrapperSettings GetConfig() { OfficeViewerWrapperSettings settings = (OfficeViewerWrapperSettings)ConfigurationBroker.GetSection("officeViewerWrapperSettings"); if (settings == null) { settings = new OfficeViewerWrapperSettings(); } return(settings); }
protected override void CreateChildControls() { HtmlGenericControl activeX = new HtmlGenericControl("object"); activeX.Attributes["classid"] = OfficeViewerWrapperSettings.GetConfig().ClassID; activeX.Attributes["id"] = ViewerControlID; activeX.Attributes["codebase"] = OfficeViewerWrapperSettings.GetConfig().Codebase; activeX.Attributes["width"] = "100%"; activeX.Attributes["height"] = "100%"; activeX.Controls.Add(CreateParamElement("LicenseName", OfficeViewerWrapperSettings.GetConfig().LicenseName)); activeX.Controls.Add(CreateParamElement("LicenseCode", OfficeViewerWrapperSettings.GetConfig().LicenseCode)); activeX.Controls.Add(CreateParamElement("Toolbars", ShowToolbars ? -1 : 0)); this.Controls.Add(activeX); base.CreateChildControls(); }