void Connection_ConnectionStateChanged(object sender, ConnectionEventArgs e)
 {
     if (e.Connected)
     {
         Connection.ConnectionStateChanged -= Connection_ConnectionStateChanged;
         OnReconnected(e);
         Timer.Elapsed -= Timer_Elapsed;
         Timer.Close();
         Timer = null;
     }
     else
         Timer.Start();
 }
 protected void OnReconnected(ConnectionEventArgs e)
 {
     try
     {
         if (Reconnected != null)
             Reconnected(this, e);
     }
     catch { }
 }