/// <summary> /// Load serial and get all serial ports /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Form1_Load(object sender, EventArgs e) { serial = new Serial(); serial.SerialEvent += new EventHandler(SerialEvent); CB_serial_port.Invoke(new Action(() => InvokeSerialPort())); }
/// <summary> /// Event when the serial port change /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SerialEvent(object sender, EventArgs e) { CB_serial_port.Invoke(new Action(() => InvokeSerialPort())); }