示例#1
0
 private void FrmMain_Load(object sender, EventArgs e)
 {
     var ports = SerialPort.GetPortNames();
     cmbPorts.DataSource = ports;
     if (cmbPorts.Items.Count == 0)
     {
         btnOpen.Enabled = false;
     }
     _reader = new BarCodeReader();
 }
示例#2
0
        private void FrmMain_Load(object sender, EventArgs e)
        {
            var ports = SerialPort.GetPortNames();

            cmbPorts.DataSource = ports;
            if (cmbPorts.Items.Count == 0)
            {
                btnOpen.Enabled = false;
            }
            _reader = new BarCodeReader();
        }