private void OnSockConnEvent(SocketStatusEventArgs e) { if (SocketConnEvent != null) { SocketConnEvent(this, e); } }
private void SocketMgr_SocketConnEvent(object sender, SocketStatusEventArgs e) { //try //{ // if (e.Connect) // { // picSockConnect.Image = global::SmartWaterSystem.Properties.Resources.SockConnect; // //btnSocketConnect.Enabled = false; // } // else // { // picSockConnect.Image = global::SmartWaterSystem.Properties.Resources.SockNotConnect; // //btnSocketConnect.Enabled = true; // } //} //catch { } SocketStatusChange(e.Connect); }