Ejemplo n.º 1
0
        private void but_Check_Click(object sender, EventArgs e)
        {
            //chkPort();

            var    reader = new SerialReader(cmbo_Ports.Text);
            string message;


            reader.OpenPort();
            message = reader.PortIsOpen ? $"Port {reader.PortName} has been opened"
                                                : $"Port {reader.PortName} could not be opened";
            //reader.ClosePort();

            MessageBox.Show(message);
        }