SVN r1029
SVN-Revision: r1029
This commit is contained in:
@@ -43,7 +43,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));
|
||||
@@ -51,6 +51,10 @@ namespace Lskj.Control
|
||||
bsClient.frmWebBrowser = this;
|
||||
bsClient.OnCreated += bsClient_OnCreated;
|
||||
var cefBrowserSettings = new CefBrowserSettings() { };
|
||||
if (enUrl)
|
||||
{
|
||||
url = ToEnUrl(url);
|
||||
}
|
||||
//Url = "https://ie.icoa.cn/";
|
||||
CefBrowserHost.CreateBrowser(cefWindowInfo, bsClient, cefBrowserSettings, url);
|
||||
//清除所有Cookie
|
||||
@@ -81,10 +85,14 @@ namespace Lskj.Control
|
||||
);
|
||||
}
|
||||
}
|
||||
public void LoadUrl(string url)
|
||||
public void LoadUrl(string url, bool enUrl = true)
|
||||
{
|
||||
if (cefBrowserSettings != null)
|
||||
{
|
||||
if (enUrl)
|
||||
{
|
||||
url = ToEnUrl(url);
|
||||
}
|
||||
cefBrowserSettings.GetMainFrame().LoadUrl(url);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user