private void BtnExitClick(object sender, EventArgs e) { if (_xmpp != null && _xmpp.Connected) { _xmpp.Disconnect(); } Application.Exit(); }