using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Watch { public partial class Form1 : Form { int a, b, c;, public Form1() { InitializeComponent(); } private void timer1_Tick(object sender, EventArgs e) { if(c>100) { b++; c = 0; } if (b>60) { a++; b = 0; } c++; label1.Text = a.ToString(); label2.Text = b.ToString(); label3.Text = c.ToString(); } private void button1_Click(object sender, EventArgs e) { timer1.Enabled = true; } private void button2_Click(object sender, EventArgs e) { timer1.Enabled = false; } private void button3_Click(object sender, EventArgs e) { a = b = c = 0; } private void button4_Click(object sender, EventArgs e) { listBox1.Items.Add(label1.Text + ":" + label2.Text + ":" + label3.Text); } private void button5_Click(object sender, EventArgs e) { listBox1.Items.Remove(listBox1.Text); } } }