public static void Init() { CefSharp.CefSettings settings = new CefSharp.CefSettings(); settings.RegisterScheme(new CefCustomScheme { SchemeName = "theme", SchemeHandlerFactory = new ThemeSchemeHandlerFactory() }); if (Cef.Initialize(settings)) { //CEF.RegisterScheme("test", new SchemeHandlerFactory()); //CEF.RegisterJsObject("bound", new BoundObject()); } }
public void Init() { var setting = new CefSharp.CefSettings(); setting.RegisterScheme(new CefCustomScheme { SchemeName = CefSharpSchemeHandlerFactory.SchemeName, SchemeHandlerFactory = new CefSharpSchemeHandlerFactory() }); // 设置语言 setting.Locale = "zh-CN"; // en-US CefSharp.Cef.Initialize(setting, true, false); }