首页 > Windows开发 > 详细

C# NanUI WinFormium监听页面加载开始\结束

时间:2019-05-09 21:56:45      阅读:280      评论:0      收藏:0      [点我收藏+]

个人博客 地址:https://www.wenhaofan.com/article/20190501213608

因为NanUI文档中仅介绍了Formium窗口的监听,但是没有WinFormium相关的文档,查看源码后才找到监听方法,特此记录一下

public partial class Form1 : WinFormium
{public Form1(): base("http://res.app.local/asserts/index.html")
{
	InitializeComponent();
        FileManager fm = new FileManager();
	LoadHandler.OnLoadStart += LoadHandler_OnLoadStart;
        LoadHandler.OnLoadEnd += LoadHandler_OnLoadEnd;
}

//监听页面加载完成
private void LoadHandler_OnLoadEnd(object sender, Chromium.Event.CfxOnLoadEndEventArgs e)
 {
     // Check if it is the main frame when page has loaded.
            
     //     ExecuteJavascript("sayHello()");
            
}
//监听页面加载结束
private void LoadHandler_OnLoadStart(object sender, Chromium.Event.CfxOnLoadStartEventArgs e)
{
    #if DEBUG
	Chromium.ShowDevTools();
    #endif
}
}

C# NanUI WinFormium监听页面加载开始\结束

原文:https://www.cnblogs.com/fanwenhao/p/10841153.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!