Beispiel #1
0
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                NumIn = (int)dudNumInput.Value;

                for (int i = 0; i < NumIn; i++)
                {
                    IORobot io = (IORobot)dgIn.Items[i];
                    Input_L[i].BlUnion    = io.BlUnion;
                    Input_L[i].Annotation = io.Annotation;
                }

                NumOut = (int)dudNumOutput.Value;
                for (int i = 0; i < NumOut; i++)
                {
                    IORobot io = (IORobot)dgOut.Items[i];
                    Output_L[i].BlUnion    = io.BlUnion;
                    Output_L[i].Annotation = io.Annotation;
                }
                WriteParIO();

                //刷新显示
                ShowPar_Invoke();
            }
            catch (Exception ex)
            {
            }
        }
Beispiel #2
0
 private void dgOut_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     try
     {
         int     par1       = dgOut.SelectedIndex;
         IORobot ioSelected = Output_L[par1];
         string  cmd        = ioSelected.Value == 0 ? "2000" : "2001";
         LogicRobot.L_I.WriteRobotCMD(par1.ToString(), cmd);
     }
     catch (Exception ex)
     {
     }
 }