日期:2014-05-18 浏览次数:20942 次
private DateTime lastInputTime; private void textBox1_TextChanged(object sender, EventArgs e) { if (lastInputTime.AddSeconds(1) < DateTime.Now) { (sender as TextBox).Text = string.Empty; } lastInputTime = DateTime.Now; }