public void RemovePort() { if (SelectedPort==null) return; ports.Remove(SelectedPort); IsListenersModified = true; }