說明:Timer的命名結合自己的情況;在代碼項目中命名,我的代碼中Timer
控件的Name爲:CSharp_Chart_USB_4711A_Timer
//開始 停止
private void button1_Click(object sender, EventArgs e)
{
if (button1.Text == "開始")
{
CSharp_Chart_USB_4711A_Timer.Start();
button1.Text = "停止";
}
else
{
CSharp_Chart_USB_4711A_Timer.Stop();
button1.Text = "開始";
}
}