コード例 #1
0
 /// <summary>
 /// 根据选择的板卡号创建任务
 ///// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void comboBox_boardNum_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         boardNum = comboBox_boardNum.SelectedIndex;
         aitask   = new JYUSB62401AITask(boardNum);
     }
     catch (JYDriverException ex)
     {
         MessageBox.Show(ex.Message);
         return;
     }
 }
コード例 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         aitask     = new JYUSB62401AITask(int.Parse(comboBox_boardNum.Text));
         led1.Value = true;
     }
     catch (Exception ex)
     {
         led1.Value = false;
         MessageBox.Show(ex.Message);
     }
 }