public static class COM
{
public static SerialPort CurrentSerial {get; private set; }
public static InitSerialPort(string text, int baudRate)
{
CurrentSerial = new SerialPort();
CurrentSerial.PortName = text;
CurrentSerial.BaudRate = baudRate;
CurrentSerial.Open();
}
}