Esempio n. 1
0
 private void buttonRemoveOutput_Click(object sender, EventArgs e)
 {
     if (dataGridViewOutput.SelectedRows.Count == 1)
     {
         OutputData data = dataGridViewOutput.SelectedRows[0].DataBoundItem as OutputData;
         IOManage.IODoc.m_OutputDictionary.Remove(data.strIOName);
         IOManage.IODoc.m_OutputDataList.Remove(data);
         DrawOutput();
     }
 }
Esempio n. 2
0
 public void Init(OutputData data)
 {
     ioData        = data;
     strDriverName = data.OutputCardName;
     try
     {
         if (HardwareManage.hardwardDictionary[ioData.OutputCardName] is IOutputAction)
         {
             actionOutput = (IOutputAction)HardwareManage.hardwardDictionary[ioData.OutputCardName];
             iOutputNo    = ioData.iOutputNo;
             bIgnore      = ioData.bignore;
             strRemark    = ioData.strRemark;
             bready       = true;
         }
     }
     catch
     {
     }
 }
Esempio n. 3
0
 private void buttonAddOutput_Click(object sender, EventArgs e)
 {
     if (textBoxOutputName.Text == "")
     {
         return;
     }
     try
     {
         OutputData data = new OutputData();
         data.strIOName      = textBoxOutputName.Text.Trim();
         data.iOutputNo      = 0;
         data.OutputCardName = "";
         IOManage.IODoc.m_OutputDictionary.Add(data.strIOName, data);
         IOManage.IODoc.m_OutputDataList.Add(data);
         DrawOutput();
     }
     catch
     {
     }
 }