private void ShowTcpDisconnectedEvent(TcpDisconnectedEventArgs args) { try { this.Invoke(new Action(() => { var nodeKey = args.ConnectionID; // 更新网络状态图 var nodeDevice = treeViewNetwork.Nodes.Find(args.RemoteID.ToString(), false); if (nodeDevice.Length != 0) { TreeNode[] nodeSub = nodeDevice[0].Nodes.Find(nodeKey, false); if (nodeSub.Length > 0) { nodeDevice[0].Nodes.Remove(nodeSub[0]); } } })); } catch (System.Exception ex) { this.ShowLog(ex.Message); } }
private void OnTcpDisconnected(object sender, TcpDisconnectedEventArgs e) { try { _productCache.AddTail(e); } catch (System.Exception) { } }
void IAleTunnelEventNotifier.NotifyTcpDisconnected(TcpDisconnectedEventArgs args) { try { if (this.TcpDisconnected != null) { this.TcpDisconnected(null, args); } } catch (System.Exception) { } }
void IAleTunnelObserver.OnTcpDisconnected(AleTunnel theConnection, string reason) { try { LogUtility.Info(string.Format("{0}: A TCP Connection disconnected. LEP = {1}, REP = {2}", this.RsspEP.ID, theConnection.LocalEndPoint, theConnection.RemoteEndPoint)); this.HandleTunnelDisconnected(theConnection, reason); // 通知观察器连接关闭。 var args = new TcpDisconnectedEventArgs(theConnection.ID, _rsspEndPoint.LocalID, theConnection.LocalEndPoint, _rsspEndPoint.RemoteID, theConnection.RemoteEndPoint); _tunnelEventNotifier.NotifyTcpDisconnected(args); } catch (System.Exception ex) { LogUtility.Error(ex.ToString()); } }
private void OnDisconnectedEventArgs(object sender, TcpDisconnectedEventArgs e) { throw new NotImplementedException(); }