【发布时间】:2014-04-06 08:56:37
【问题描述】:
我正在开发连接到网络的新功能,但在几次尝试失败后,这个对网络的请求被锁定,我需要等待 15 分钟。我有我自己运行的计时器应用程序设置计时器并启动,但我想在我的代码中插入这个设置并运行应用程序。
以前有人做过吗?设置计时器并自动运行 Windows 应用程序(任何)?
private bool TryToLogin()
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(loginPostUrl);
LoginInfo = streamReadLogin.ReadToEnd();
string postData = null;
postData += "__REQUESTDIGEST=" + GetValueByID(LoginInfo);
if (outString.IndexOf("User xxx") > -1)
{
throw new System.InvalidOperationException("User is all ready login");
// here I need to run my windows application
}
connected = true;
}
【问题讨论】: