diff --git a/客户端/齐越慧眼/齐越慧眼/App.xaml.cs b/客户端/齐越慧眼/齐越慧眼/App.xaml.cs index 8110607..5ad715f 100644 --- a/客户端/齐越慧眼/齐越慧眼/App.xaml.cs +++ b/客户端/齐越慧眼/齐越慧眼/App.xaml.cs @@ -20,12 +20,15 @@ namespace 齐越慧眼 public App() { Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); var settings = new CefSettings() { - CachePath = System.Environment.CurrentDirectory + "\\webDatas\\data", + // CachePath = System.Environment.CurrentDirectory + "\\webDatas\\data", // LocalesDirPath = System.Environment.CurrentDirectory + "\\webDatas", - RootCachePath= System.Environment.CurrentDirectory + "\\rootCache", + // RootCachePath= System.Environment.CurrentDirectory + "\\rootCache", UserAgent= "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36 SE 2.X MetaSr 1.0", - Locale= "zh-CN" - }; + Locale= "zh-CN", + // AutoDetectProxySettings = false, + // PackLoadingDisabled = true, + // LogSeverity = LogSeverity.Disable + }; // ... settings.RegisterScheme(new CefCustomScheme() diff --git a/客户端/齐越慧眼/齐越慧眼/UserControls/BrowerControl.xaml.cs b/客户端/齐越慧眼/齐越慧眼/UserControls/BrowerControl.xaml.cs index c9271c4..18cf2b1 100644 --- a/客户端/齐越慧眼/齐越慧眼/UserControls/BrowerControl.xaml.cs +++ b/客户端/齐越慧眼/齐越慧眼/UserControls/BrowerControl.xaml.cs @@ -18,22 +18,20 @@ namespace 齐越慧眼.UserControls { public static BrowerControl Main = null; - static MyRequestHandler myRequest; - public ChromiumWebBrowser web; + public ExtChromiumBrowser web; public BrowerControl() { InitializeComponent(); - myRequest = new MyRequestHandler() { brower=this}; - web = new ChromiumWebBrowser("https://www.taobao.com") + web = new ExtChromiumBrowser("https://www.taobao.com") { BrowserSettings = { DefaultEncoding = "UTF-8", - Plugins = CefState.Enabled, + // Plugins = CefState.Enabled, //关于跨域限制 //WebSecurity = CefState.Disabled, - ApplicationCache = CefState.Enabled, - LocalStorage = CefState.Enabled + // ApplicationCache = CefState.Enabled, + // LocalStorage = CefState.Enabled }, // RequestHandler = myRequest @@ -47,7 +45,7 @@ namespace 齐越慧眼.UserControls web.JavascriptObjectRepository.Register("hyCoreModel", new CefAsyncJS(), BindingOptions.DefaultBinder); Main = this; - // web.StartNewWindow += Web_StartNewWindow; + web.StartNewWindow += Web_StartNewWindow; } @@ -106,7 +104,7 @@ namespace 齐越慧眼.UserControls { StartPage(); } - web.ShowDevTools(); + // web.ShowDevTools(); } }