BTool.ComPortTreeForm.RemovePort C# (CSharp) Method

RemovePort() public method

public RemovePort ( string portName ) : bool
portName string
return bool
        public bool RemovePort(string portName)
        {
            bool flag = true;
            treeViewUtils.RemoveTextFromTree(tvPorts, portName);
            return flag;
        }

Usage Example

Esempio n. 1
0
        private void tsmiCloseDevice_Click(object sender, EventArgs e)
        {
            m_mutex.WaitOne();
            DeviceForm activeDeviceForm = GetActiveDeviceForm();

            if (activeDeviceForm != null)
            {
                activeDeviceForm.DeviceFormClose(true);
                activeDeviceForm.Close();
                comPortTreeForm.RemovePort(activeDeviceForm.devInfo.ComPortInfo.ComPort);
            }
            comPortTreeForm.FindNodeToOpen();
            m_mutex.ReleaseMutex();
        }