/// <summary> /// Loads html from the resource /// </summary> public void LoadResource(Type baseType, String resource) { #region Arguments checking if (baseType == null) { throw new ArgumentNullException("baseType"); } if (String.IsNullOrEmpty(resource)) { throw new ArgumentNullException("resource"); } #endregion var resourceName = ResProtocol.ProtocolPrefix + baseType.AssemblyQualifiedName + ResProtocol.PathSeparator + resource; var text = SciterFactory.ResolveBinResource(resourceName, ResourceType.Html); if (text == null) { throw new FileNotFoundException(String.Format("Resource {0} not found", resourceName)); } SciterHostApi.SciterLoadHtml(Handle, text, resourceName); }
/// <summary> /// Loads html from file /// </summary> public void LoadResource(String resourceName) { var text = SciterFactory.ResolveBinResource(resourceName, ResourceType.Html); if (text == null) { throw new FileNotFoundException(String.Format("Resource {0} not found", resourceName)); } SciterHostApi.SciterLoadHtml(Handle, text, resourceName); }