BerkeliumSharp works on Window XP, fails silently on Windows 8

151 views Asked by At

I'm using BerkeliumSharp found here: http://code.google.com/p/berkelium-sharp/

I'm attempting to learn how to use this, but have ran into a problem. The following code works properly on Windows XP, and outputs document.html. On Windows 8 though, no events fire, essentially failing silently.

What could cause this?

    static void Main()
    {
        BerkeliumSharp.Init(new System.IO.FileInfo(Assembly.GetEntryAssembly().Location).DirectoryName);
        Context context = Context.Create();
        Window window = new Window(context);
        window.ChromeSend += new ChromeSendHandler(window_ChromeSend);
        window.Load += new BasicHandler(window_Load);
        window.Resize(1024, 768);
        window.NavigateTo("http://www.google.com");

        while (true)
        {
            Berkelium.Managed.BerkeliumSharp.Update();
            System.Threading.Thread.Sleep(100);
        }
    }

    static void window_Load(Window window)
    {
        window.ExecuteJavascript("window.chrome.send(document.documentElement.innerHTML);");
    }
    static void window_ChromeSend(Window window, string message, string[] arguments)
    {
        System.IO.File.WriteAllText("document.html", message);
    }
0

There are 0 answers