private void OnDisposed(object sender, Beetle.ChannelDisposedEventArgs e) { Invoke(new Action <Register>(o => { cmdRegister.Enabled = !(cmdConnect.Enabled = true); }), null); }
private void OnDisposed(object sender, Beetle.ChannelDisposedEventArgs e) { Invoke(new Action <object>(o => { cmdSend.Enabled = false; cmdConnect.Enabled = true; }), new object()); }
protected override void OnDisposed(object sender, Beetle.ChannelDisposedEventArgs e) { base.OnDisposed(sender, e); m_channel = null; if (hasEvent) { OnConnect(false, (Beetle.ChannelEventArgs)e); } }
// 连接断开事件 protected void _evt_Disposed(object sender, Beetle.ChannelDisposedEventArgs e) { _Connected = m_channel.Socket.Connected && !m_channel.IsDisposed; if (hasEvent) { OnConnect(_Connected, string.Format("{0}:{1}", IP, Port)); } IP = ""; Port = 0; //Invoke(new Action<object>(o => // { // _do_Connected(); // }), // new object()); }
protected override void OnDisposed(object sender, Beetle.ChannelDisposedEventArgs e) { base.OnDisposed(sender, e); Console.WriteLine("{0} disposed", e.Channel.EndPoint); }