private void XmppOnOnRegistered(object sender) { Vcard v = new Vcard(); Email e = new Email { UserId = _email, Type = EmailType.INTERNET, Value = _email }; v.AddChild(e); v.JabberId = new Jid(this.Username + "@" + Host); VcardIq vc = new VcardIq(IqType.set, v); vc.To = Host; vc.GenerateId(); Xmpp.Send(vc); if (OnRegisterComplete != null) { OnRegisterComplete.Invoke(this, RegisterResults.Success); } }
/// <summary> /// The xmpp on on register error. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="element"> /// The element. /// </param> private void XmppOnOnRegisterError(object sender, Element element) { OnRegisterComplete.Invoke(this, RegisterResults.UsernameTaken); Trace.WriteLine("[this.xmpp]Register Error...Closing..."); this.xmpp.Close(); }
private void BtnRegister_Click(object sender, EventArgs e) { OnRegisterComplete.Invoke(this, new OnRegisterEventArgs(mtxtBoxEmail.Text, mtxtBoxPassword.Text, mtxtBoxConfirmPassword.Text)); this.Dismiss(); }