private void button2_Click(object sender, EventArgs e) { FingerPrint_Verify activate = new FingerPrint_Verify(); string Timer = time_txt.Text; if (Timer == null || Timer == "") { MessageBox.Show("please add a timer"); } else { int time = Convert.ToInt32(Timer); TimeSpan timer = new TimeSpan(0, time, 0); TimeSpan one_sec = new TimeSpan(0, 0, 1); for (int i = 0; i <= timer.Seconds; i++) { timer.Subtract(one_sec); } if (timer.TotalSeconds == 0 || time_txt.Text == "0") { MessageBox.Show("please set a timer"); ///activate.Close(); } else { activate.ShowDialog(); } } }
private void Student_sub_btn_Click(object sender, EventArgs e) { FingerPrint_Verify verify = new FingerPrint_Verify(); verify.ShowDialog(); }