/// <summary> /// Occurs when the server disconnected. /// </summary> /// <param name="e">Server information.</param> protected virtual void OnServerDisconnected(ServerEventArgs e) { if (ServerDisconnected != null) { Control target = ServerDisconnected.Target as Control; ServerDisconnected(this, e); } }
/// <summary> /// Occurs when the server disconnected. /// </summary> /// <param name="e">Server information.</param> protected virtual void OnServerDisconnected(ServerEventArgs e) { if (ServerDisconnected != null) { Control target = ServerDisconnected.Target as Control; if (target != null && target.InvokeRequired) { target.Invoke(ServerDisconnected, new object[] { this, e }); } else { ServerDisconnected(this, e); } } }