예제 #1
0
 void RequestHandler_GetResourceHandler(object sender, CfxGetResourceHandlerEventArgs e)
 {
     WebResource resource;
     if(client.browser.WebResource.TryGetValue(e.Request.Url, out resource)) {
         e.SetReturnValue(resource.GetResourceHandler());
     }
 }
예제 #2
0
        private void ResourceRequestHandler_GetResourceHandler(object sender, CfxGetResourceHandlerEventArgs e)
        {
            WebResource resource;

            if (client.browser.webResources.TryGetValue(e.Request.Url, out resource))
            {
                e.SetReturnValue(resource.GetResourceHandler());
            }
        }
예제 #3
0
        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);
                }
            }
        }