SVN r1027
SVN-Revision: r1027
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user