예제 #1
0
 private void btnIntegration_Click(object sender, EventArgs e)
 {
     if (!CheckControllable())
         return;
     timer1.Enabled = false;
     uint uiVal = (uint)AnalogInput.GetIntegrationCode(AdamType.Apax5000, cbxIntegration.SelectedIndex);
     if (m_adamSocket.AnalogInput().SetIntegration(m_idxID, uiVal))
     {
         MessageBox.Show("Set integration time done!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1);
         RefreshAiSetting();
     }
     else
     {
         MessageBox.Show("Set integration time failed!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1);
     }
     timer1.Enabled = true;
 }