public void SetUp() { Instance = this; waitCreated = new ManualResetEvent(false); Settings settings = new Settings(); BrowserSettings browserSettings = new BrowserSettings(); if (!CEF.Initialize(settings, browserSettings)) { Assert.Fail("Couldn't initialise CEF."); return; } // CEF.RegisterScheme("test", new TestSchemeHandlerFactory()); CEF.RegisterJsObject("bound", new BoundObject()); // Application.EnableVisualStyles(); // Application.SetCompatibleTextRenderingDefault(false); var uiThread = new Thread(UIThread); uiThread.SetApartmentState(ApartmentState.STA); uiThread.Start(); waitCreated.WaitOne(); }
static void Main() { oPATH.Init(); Settings settings = new Settings() { }; if (CEF.Initialize(settings) == false) { return; } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var m = new fOther(); var f = new fMain(m); CEF.RegisterScheme("local", new SchemeHandlerFactory()); CEF.RegisterScheme("img", new ImageHandlerFactory(f)); CEF.RegisterJsObject("api", f); Application.Run(f); //Application.Run(new fEditor("ability")); m.Close(); CEF.Shutdown(); }
private void RegisterAutomationObject() { var automation = new AutomationObject(); automation.UserActionReceived += UserActionReceived; CEF.RegisterJsObject("automation", automation); }
public static void Startup() { var settings = new Settings(); if (CEF.Initialize(settings)) { CEF.RegisterJsObject(CallbackObjectName, CallbackHandler); } }
public static void Init() { Settings settings = new Settings(); if (CEF.Initialize(settings)) { CEF.RegisterScheme("test", new SchemeHandlerFactory()); CEF.RegisterJsObject("bound", new BoundObject()); } }
public static void Run() { Settings settings = new Settings(); if (CEF.Initialize(settings)) { CEF.RegisterScheme("play", new SchemeHandlerFactory()); CEF.RegisterJsObject("bound", new BoundObject()); player = new fPlayer(); Application.Run(player); } }
static void Main(string[] args) { Settings settings = new Settings(); BrowserSettings browserSettings = new BrowserSettings(); if (!CEF.Initialize(settings, browserSettings)) { Console.WriteLine("Couldn't initialise CEF"); return; } CEF.RegisterScheme("test", new TestSchemeHandlerFactory()); CEF.RegisterJsObject("bound", new BoundObject()); Browser browser = new Browser(); Application.Run(browser); }