Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        private void RegisterAutomationObject()
        {
            var automation = new AutomationObject();

            automation.UserActionReceived += UserActionReceived;
            CEF.RegisterJsObject("automation", automation);
        }
Exemplo n.º 4
0
        public static void Startup()
        {
            var settings = new Settings();

            if (CEF.Initialize(settings))
            {
                CEF.RegisterJsObject(CallbackObjectName, CallbackHandler);
            }
        }
Exemplo n.º 5
0
        public static void Init()
        {
            Settings settings = new Settings();

            if (CEF.Initialize(settings))
            {
                CEF.RegisterScheme("test", new SchemeHandlerFactory());
                CEF.RegisterJsObject("bound", new BoundObject());
            }
        }
Exemplo n.º 6
0
        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);
            }
        }
Exemplo n.º 7
0
        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);
        }