Exemplo n.º 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);
        }
Exemplo n.º 2
0
        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);
        }