Exemple #1
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     //根据间隔时间运行UploadData的程序
     timer1.Enabled = false;
     System.DateTime dt = System.DateTime.Now;
     nCount = nCount + 1;
     try {
         dt = System.DateTime.Parse(txtTestTime.Text);
     }catch (Exception er)
     {
     }
     dataTransferAction.Execute(_deviceElement, dt);
 }
Exemple #2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            //根据间隔时间运行UploadData的程序
            timer1.Enabled = false;
            DateTime dateTime;

            try
            {
                dateTime = System.DateTime.Parse(txtTestTime.Text);

                dataTransferAction.Execute(_deviceElement, dateTime);

                //显示计数
                nCount = nCount + 1;
            }catch (Exception er)
            {
                MessageBox.Show(er.Message);

                return;
            }
        }