コード例 #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            ViewSourceProtocol = new ViewSourceProtocolHandler(
                WebKit.GetWindow().Context
            );

            WebKit.GetWindow().AddBindOnStartLoading("glutCallback", "glutCB", false);

            var filePath = "http://www.google.com/";

            WebKit.GetWindow().NavigateTo(filePath);
        }
コード例 #2
0
ファイル: MainWindow.cs プロジェクト: pathorn/berkelium-sharp
        private void Form1_Load(object sender, EventArgs e)
        {
            AssetProtocol = new FileProtocolHandler(
                WebKit.GetWindow().Context,
                "asset",
                (filename) => {
                    try {
                        return File.OpenRead(Path.Combine(
                            Path.GetDirectoryName(Application.ExecutablePath), filename
                        ));
                    } catch {
                        return null;
                    }
                }
            );
            ViewSourceProtocol = new ViewSourceProtocolHandler(
                WebKit.GetWindow().Context
            );

            var filePath = "asset://./test.html";
            WebKit.GetWindow().NavigateTo(filePath);
        }