示例#1
0
        private void initialize_com_ports()
        {
            if (PPG1.PortName != "none")
            {
                PPG1.Open();
            }

            if (PPG2.PortName != "none")
            {
                PPG2.Open();
            }
        }
示例#2
0
 private void initializeComPorts()
 {
     try
     {
         if (PPG1.PortName != "none")
         {
             PPG1.Open();
         }
         if (PPG2.PortName != "none")
         {
             PPG2.Open();
         }
     } catch {
         MessageBox.Show("Could not connect with glove, please try again. If the problem stays, please reset the device.", "Connection error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         this.Dispose();
     }
 }