diff --git a/插件库/Lskj.Control/FrmWebBrowser.cs b/插件库/Lskj.Control/FrmWebBrowser.cs index 1fd4a22..18f136f 100644 --- a/插件库/Lskj.Control/FrmWebBrowser.cs +++ b/插件库/Lskj.Control/FrmWebBrowser.cs @@ -40,7 +40,7 @@ namespace Lskj.Control //CefRuntime.Shutdown(); } - public void FrmLoad(string url, int RightKeyFlag = 0) + public void FrmLoad(string url, int RightKeyFlag = 0, bool enUrl = true) { var cefWindowInfo = CefWindowInfo.Create(); cefWindowInfo.SetAsChild(this.Handle, new CefRectangle(0, 0, this.Width, this.Height)); @@ -49,7 +49,11 @@ namespace Lskj.Control bsClient.OnCreated += bsClient_OnCreated; var cefBrowserSettings = new CefBrowserSettings(); //Url = "https://ie.icoa.cn/"; - CefBrowserHost.CreateBrowser(cefWindowInfo, bsClient, cefBrowserSettings, ToEnUrl(url)); + if (enUrl) + { + url = ToEnUrl(url); + } + CefBrowserHost.CreateBrowser(cefWindowInfo, bsClient, cefBrowserSettings, url); //清除所有Cookie var cookieManager = CefCookieManager.GetGlobal(null); cookieManager.DeleteCookies("", "", null); @@ -75,11 +79,15 @@ namespace Lskj.Control 0x0002 | 0x0004 ); } - public void LoadUrl(string url) + public void LoadUrl(string url, bool enUrl = true) { if (cefBrowserSettings != null) { - cefBrowserSettings.GetMainFrame().LoadUrl(ToEnUrl(url)); + if (enUrl) + { + url = ToEnUrl(url); + } + cefBrowserSettings.GetMainFrame().LoadUrl(url); } } public void LoadRequest(string url, string dataStr)