tbf/TestBenchFramework/Forms/ClosingProgram.cs
2014-07-28 09:56:40 +02:00

32 lines
686 B
C#

using System;
using System.Windows.Forms;
namespace TBF.Forms
{
public partial class ClosingProgram : Form
{
Timer timer;
public ClosingProgram()
{
InitializeComponent();
timer = new Timer();
timer.Interval = 1000;
timer.Tick += new EventHandler(timer_Tick);
timer.Start();
}
void timer_Tick(object sender, EventArgs args)
{
if (!TBF.BenchControl.StateMachine.Running)
{
timer.Stop();
timer.Dispose();
DialogResult = DialogResult.OK;
Close();
}
}
}
}