void scanner_PortReply(System.Net.IPEndPoint remoteEndPoint, Metro.Scanning.TcpPortState state) { Counter--; ScanResult r = new ScanResult(); r.RemoteEndPoint = remoteEndPoint; r.State = state; Results.Add(r); this.Invoke(miv); }
void scanner_PortReply(System.Net.IPEndPoint remoteEndPoint, Metro.Scanning.TcpPortState state) { try { lock (uiElementsLock) pendingRequests--; if (state == Metro.Scanning.TcpPortState.Opened) { string protocol = Terminals.Connections.ConnectionManager.GetPortName(remoteEndPoint.Port, true); AddFavorite(remoteEndPoint.Address.ToString(), remoteEndPoint.Address.ToString() + "_" + protocol, remoteEndPoint.Port); } this.Invoke(miv); } catch (Exception e) { Terminals.Logging.Log.Info("", e); } }