标签:win close 拨号 pen ble else event object opened
private int leftTime = 5; private void timer1_Tick(object sender, EventArgs e) { button.Enabled = false; if (leftTime >= 10) { this.label1.Text = leftTime.ToString(); button.Text = "拨号 (请稍后0" + leftTime.ToString() + ")"; } else { this.label1.Text = "拨号 0" + leftTime.ToString(); button.Text = "拨号 (请稍后0" + leftTime.ToString() + ")"; } if (leftTime == 0) { //倒计时到“00”,计时器停止 this.timer1.Stop(); //去做其他事情 //...... button.Enabled = true; timer1.Enabled = false; this.label1.Text = ""; button.Text = "拨号"; leftTime = 5; } else { leftTime--; } } private void button1_Click(object sender, EventArgs e) { timer1.Enabled = true; }
标签:win close 拨号 pen ble else event object opened
原文地址:http://www.cnblogs.com/tylerflyn/p/7856236.html