Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/291.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# BerkeliumSharp在Windows XP上工作,在Windows 8上无声失败_C#_Windows 8_Berkelium - Fatal编程技术网

C# BerkeliumSharp在Windows XP上工作,在Windows 8上无声失败

C# BerkeliumSharp在Windows XP上工作,在Windows 8上无声失败,c#,windows-8,berkelium,C#,Windows 8,Berkelium,我正在使用BerkeliumSharp在这里找到: 我正在尝试学习如何使用它,但遇到了一个问题。以下代码在Windows XP上正常工作,并输出document.html。但在Windows8上,没有任何事件触发,基本上是无声失败的 这是什么原因造成的 static void Main() { BerkeliumSharp.Init(new System.IO.FileInfo(Assembly.GetEntryAssembly().Location).Direc

我正在使用BerkeliumSharp在这里找到:

我正在尝试学习如何使用它,但遇到了一个问题。以下代码在Windows XP上正常工作,并输出document.html。但在Windows8上,没有任何事件触发,基本上是无声失败的

这是什么原因造成的

    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);
    }

我在Windows8x64上也遇到了Berkelium的问题。不过,Windows7x64运行良好。希望有人能回答你的问题。