using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Timers4
{
public partial class TimingGameForm : Form
{
public TimingGameForm()
{
InitializeComponent();
}
private int elapsed = 0;
private bool started = false;
private void Start_Click(object sender, EventArgs e)
{
if (started == true)
{
timer1.Enabled = true;
Estimatelbl.Text = "Running....";
}
else if (started == false)
{
timer1.Enabled = false;
Timelbl.Text = "that took" + elapsed + "seconds";
}
}
private void timer_Tick(object sender, EventArgs e)
{
elapsed += 1;
}
}
}