我的程序从现在到下一次更新时间完成了操作。我想以以下格式向用户显示计数器时钟计数:00:00:00 然后 00:20:00 并向后计数 20 分钟。
这是操作完成并且 timer1 应该启动的代码:
private void DownloadCompletedCallback(object sender, AsyncCompletedEventArgs e)
{
if (e.Cancelled)
{
//... download cancelled...
}
else if (e.Error != null)
{
//... download failed...
Logger.Write("Error: " + e.Error);
}
ActiveDownloadJob adJob = e.UserState as ActiveDownloadJob;
ProgressBar pb = (adJob != null) ? adJob.ProgressBar : null;
lock (_downloadQueue)
{
if (_downloadQueue.Count == 0)
{
if (pb != null)
{
pb.Tag = null;
timer2.Stop();
label8.ForeColor = Color.Green;
label8.Text = "Process Finished";
label7.Visible = true;
Timer3 滴答事件如果现在为空,但我认为我应该在那里制作并显示计数器。