tbf/TestBenchFramework/Forms/ClosingProgram.cs
2015-04-15 20:32:56 +02:00

35 lines
746 B
C#

///
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
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();
}
}
}
}