From c39d12fe78cdb2704be8418e9e8a34775dc5e55a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=C2=B7=C3=A6?= <279202647@qq.com> Date: Thu, 28 Oct 2021 22:14:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=AC=E4=B8=9C=E5=93=8D?= =?UTF-8?q?=E5=BA=94=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 客户端/齐越慧眼/齐越慧眼/App.xaml.cs | 11 +++++++---- .../UserControls/BrowerControl.xaml.cs | 16 +++++++--------- 2 files changed, 14 insertions(+), 13 deletions(-) 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(); } }