C# 可以在WatiN暂停吗?
我的WatiN应用程序可以自动浏览多个网页C# 可以在WatiN暂停吗?,c#,watin,C#,Watin,我的WatiN应用程序可以自动浏览多个网页 自动化是否有可能在某一点暂停,并且只有在用户这样说(单击“继续”按钮)时才继续自动化?我在项目中也做了类似的事情,也许这会有所帮助(我没有正确测试过这一点,但它可能会为您指出正确的方向:D) 嗯 你在用什么-WinForms,WPF?看一看事件——例如这一个 private System.Threading.AutoResetEvent arEvent = null; private System.Windows.Forms.NotifyIcon nI
自动化是否有可能在某一点暂停,并且只有在用户这样说(单击“继续”按钮)时才继续自动化?我在项目中也做了类似的事情,也许这会有所帮助(我没有正确测试过这一点,但它可能会为您指出正确的方向:D)
嗯 你在用什么-WinForms,WPF?看一看事件——例如这一个
private System.Threading.AutoResetEvent arEvent = null;
private System.Windows.Forms.NotifyIcon nIcon = null;
public void WatinBreakpoint()
{
this.arEvent = new System.Threading.AutoResetEvent(false);
this.nIcon = new NotifyIcon();
this.nIcon.Text = "Watin Breakpoint. Double click to continue";
this.notifyIcon.DoubleClick += new EventHandler(notifyIcon_DoubleClick);
this.arEvent.WaitOne();
}
private void notifyIcon_DoubleClick(object sender, EventArgs e)
{
this.arEvent.Set();
}