private void textBox2_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { listBox1.Items.Add(SnametextBox3.Text + ": " + SecondtextBox2.Text); string s = timelabel4.Text = DateTime.Now.ToLongTimeString(); listBox1.Items.Add(s); SecondtextBox2.Clear(); SecondtextBox2.Focus(); } }
private void button2_Click(object sender, EventArgs e) { FnametextBox4.Clear(); SnametextBox3.Clear(); listBox1.Items.Clear(); FirsttextBox1.Clear(); fnamelabel3.Text = string.Empty; Snamelabel3.Text = string.Empty; SecondtextBox2.Clear(); FnametextBox4.Focus(); FirsttextBox1.Enabled = false; SecondtextBox2.Enabled = false; FnametextBox4.Enabled = true; SnametextBox3.Enabled = true; }