ここにある BerkeliumSharp を使用しています: http://code.google.com/p/berkelium-sharp/
これを使用する方法を学ぼうとしていますが、問題が発生しました。次のコードは Windows XP で正しく動作し、document.html を出力します。ただし、Windows 8 では、イベントは発生せず、基本的にサイレントに失敗します。
何が原因でしょうか?
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);
}