void RequestHandler_GetResourceHandler(object sender, CfxGetResourceHandlerEventArgs e) { WebResource resource; if(client.browser.WebResource.TryGetValue(e.Request.Url, out resource)) { e.SetReturnValue(resource.GetResourceHandler()); } }
private void ResourceRequestHandler_GetResourceHandler(object sender, CfxGetResourceHandlerEventArgs e) { WebResource resource; if (client.browser.webResources.TryGetValue(e.Request.Url, out resource)) { e.SetReturnValue(resource.GetResourceHandler()); } }
internal static void GetResourceHandler(object sender, CfxGetResourceHandlerEventArgs e) { var uri = new Uri(e.Request.Url); if (uri.Scheme == Scheme && uri.Host == Domain) { try { e.SetReturnValue(new CgiResourceHandler()); } catch (Exception ex) { MessageBox.Show(ex.Message); } } }