private void btnOpenSerialModule1_Click(object sender, EventArgs e) { mf.OpenModule1Port(); if (mf.spModule1.IsOpen) { cboxModule1Port.Enabled = false; btnCloseSerialModule1.Enabled = true; btnOpenSerialModule1.Enabled = false; lblCurrentModule1Port.Text = mf.spModule1.PortName; } else { cboxModule1Port.Enabled = true; btnCloseSerialModule1.Enabled = false; btnOpenSerialModule1.Enabled = true; } }