private void button7_Click(object sender, EventArgs e) { this.currentTime = (Int32.Parse(textBox1.Text) < 10 ? "0" + Int32.Parse(textBox1.Text).ToString() : Int32.Parse(textBox1.Text).ToString()) + ":" + (Int32.Parse(textBox3.Text) < 10 ? "0" + Int32.Parse(textBox3.Text).ToString() : Int32.Parse(textBox3.Text).ToString()) + ":" + (Int32.Parse(textBox2.Text) < 10 ? "0" + Int32.Parse(textBox2.Text).ToString() : Int32.Parse(textBox2.Text).ToString()); digital.setCurrentTime(currentTime); this.Close(); }
public Form1() { InitializeComponent(); contur = new Bitmap(pictureBox1.Width, pictureBox1.Height); digital.setCurrentTime("00:00:00"); timeUpdate = new Thread(TimeUpdate); timeUpdate.IsBackground = true; timeUpdate.Priority = ThreadPriority.Lowest; timeUpdate.Start(); }