/// <include file='doc\ColorBuilder.uex' path='docs/doc[@for="ColorBuilder.BuildColor"]/*' /> /// <devdoc> /// Launches the Color Picker to build a color. /// </devdoc> public static string BuildColor(IComponent component, System.Windows.Forms.Control owner, string initialColor) { string result = null; ISite componentSite = component.Site; Debug.Assert(componentSite != null, "Component does not have a valid site."); if (componentSite == null) { Debug.Fail("Component does not have a valid site."); return(null); } if (componentSite != null) { IWebFormsBuilderUIService builderService = (IWebFormsBuilderUIService)componentSite.GetService(typeof(IWebFormsBuilderUIService)); if (builderService != null) { result = builderService.BuildColor(owner, initialColor); } } return(result); }
public static string BuildColor(IComponent component, Control owner, string initialColor) { string str = null; ISite site = component.Site; if (site == null) { return(null); } if (site != null) { IWebFormsBuilderUIService service = (IWebFormsBuilderUIService)site.GetService(typeof(IWebFormsBuilderUIService)); if (service != null) { str = service.BuildColor(owner, initialColor); } } return(str); }