日期:2014-05-18 浏览次数:20901 次
private void btnLogin_Click(object sender, EventArgs e) { Jid jid = new Jid(txtJid.Text); //用户名@服务器名 conn.Username = jid.User; conn.Server = jid.Server; conn.Password = txtPassword.Text; conn.Port = 5222; conn.UseCompression = false; conn.KeepAlive = true; conn.AutoRoster = true; conn.AutoPresence = true; conn.UseStartTLS = true; conn.AutoResolveConnectServer = false; conn.ConnectServer = "localhost"; this.DialogResult = DialogResult.OK; this.Close(); }