private void btnOpenSerialModule2_Click(object sender, EventArgs e) { mf.OpenModule2Port(); if (mf.spModule2.IsOpen) { cboxModule2Port.Enabled = false; btnCloseSerialModule2.Enabled = true; btnOpenSerialModule2.Enabled = false; lblCurrentModule2Port.Text = mf.spModule2.PortName; } else { cboxModule2Port.Enabled = true; btnCloseSerialModule2.Enabled = false; btnOpenSerialModule2.Enabled = true; } }