Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/337.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 可以在WatiN暂停吗?_C#_Watin - Fatal编程技术网

C# 可以在WatiN暂停吗?

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

我的WatiN应用程序可以自动浏览多个网页


自动化是否有可能在某一点暂停,并且只有在用户这样说(单击“继续”按钮)时才继续自动化?

我在项目中也做了类似的事情,也许这会有所帮助(我没有正确测试过这一点,但它可能会为您指出正确的方向: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();
}