SVN r1027
SVN-Revision: r1027
This commit is contained in:
@@ -40,7 +40,7 @@ namespace Lskj.Control
|
|||||||
//CefRuntime.Shutdown();
|
//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();
|
var cefWindowInfo = CefWindowInfo.Create();
|
||||||
cefWindowInfo.SetAsChild(this.Handle, new CefRectangle(0, 0, this.Width, this.Height));
|
cefWindowInfo.SetAsChild(this.Handle, new CefRectangle(0, 0, this.Width, this.Height));
|
||||||
@@ -49,7 +49,11 @@ namespace Lskj.Control
|
|||||||
bsClient.OnCreated += bsClient_OnCreated;
|
bsClient.OnCreated += bsClient_OnCreated;
|
||||||
var cefBrowserSettings = new CefBrowserSettings();
|
var cefBrowserSettings = new CefBrowserSettings();
|
||||||
//Url = "https://ie.icoa.cn/";
|
//Url = "https://ie.icoa.cn/";
|
||||||
CefBrowserHost.CreateBrowser(cefWindowInfo, bsClient, cefBrowserSettings, ToEnUrl(url));
|
if (enUrl)
|
||||||
|
{
|
||||||
|
url = ToEnUrl(url);
|
||||||
|
}
|
||||||
|
CefBrowserHost.CreateBrowser(cefWindowInfo, bsClient, cefBrowserSettings, url);
|
||||||
//清除所有Cookie
|
//清除所有Cookie
|
||||||
var cookieManager = CefCookieManager.GetGlobal(null);
|
var cookieManager = CefCookieManager.GetGlobal(null);
|
||||||
cookieManager.DeleteCookies("", "", null);
|
cookieManager.DeleteCookies("", "", null);
|
||||||
@@ -75,11 +79,15 @@ namespace Lskj.Control
|
|||||||
0x0002 | 0x0004
|
0x0002 | 0x0004
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
public void LoadUrl(string url)
|
public void LoadUrl(string url, bool enUrl = true)
|
||||||
{
|
{
|
||||||
if (cefBrowserSettings != null)
|
if (cefBrowserSettings != null)
|
||||||
{
|
{
|
||||||
cefBrowserSettings.GetMainFrame().LoadUrl(ToEnUrl(url));
|
if (enUrl)
|
||||||
|
{
|
||||||
|
url = ToEnUrl(url);
|
||||||
|
}
|
||||||
|
cefBrowserSettings.GetMainFrame().LoadUrl(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void LoadRequest(string url, string dataStr)
|
public void LoadRequest(string url, string dataStr)
|
||||||
|
|||||||
Reference in New Issue
Block a user