基线 SVN r240
SVN-Revision: r240
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
using Lskj.Business;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xilium.CefGlue;
|
||||
|
||||
namespace Lskj.Control.BrowserSetting2
|
||||
{
|
||||
public class BsClient : CefClient
|
||||
{
|
||||
public event EventHandler OnCreated;
|
||||
private readonly CefLifeSpanHandler lifeSpanHandler;
|
||||
private readonly CefDownloadHandler downloadHandler;
|
||||
private readonly CefKeyboardHandler keyboardHandler;
|
||||
private readonly CefFocusHandler focusHandler;
|
||||
private readonly CefRequestHandler requestHandler;
|
||||
private readonly CefContextMenuHandler contextMenuHandler;
|
||||
public BsClient(int RightKeyFlag = 0, bool AllowDownload = true)
|
||||
{
|
||||
if (SystemInfo.Instance.BrowserRight) RightKeyFlag = 1;
|
||||
lifeSpanHandler = new BsLifeSpanHandler(this);
|
||||
downloadHandler = new BsDownloadHandler(AllowDownload);
|
||||
keyboardHandler = new BsKeyboardHandler();
|
||||
focusHandler = new BsFocusHandler();
|
||||
requestHandler = new BsRequestHandler();
|
||||
contextMenuHandler = new BsContextMenuHandler(RightKeyFlag);
|
||||
}
|
||||
protected override CefLifeSpanHandler GetLifeSpanHandler()
|
||||
{
|
||||
return lifeSpanHandler;
|
||||
}
|
||||
protected override CefDownloadHandler GetDownloadHandler()
|
||||
{
|
||||
return downloadHandler;
|
||||
}
|
||||
protected override CefKeyboardHandler GetKeyboardHandler()
|
||||
{
|
||||
return keyboardHandler;
|
||||
}
|
||||
protected override CefFocusHandler GetFocusHandler()
|
||||
{
|
||||
return focusHandler;
|
||||
}
|
||||
protected override CefRequestHandler GetRequestHandler()
|
||||
{
|
||||
return requestHandler;
|
||||
}
|
||||
protected override CefContextMenuHandler GetContextMenuHandler()
|
||||
{
|
||||
return contextMenuHandler;
|
||||
}
|
||||
public void Created(CefBrowser cefBrowser)
|
||||
{
|
||||
if (OnCreated != null)
|
||||
{
|
||||
OnCreated(cefBrowser, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user