/// <summary>处理修改个人信息的回复包 /// Processes the modify info reply. /// </summary> /// <param name="inPacket">The in packet.</param> /// <param name="outPacket">The out packet.</param> private void ProcessModifyInfoReply(ModifyInfoReplyPacket inPacket, ModifyInfoPacket outPacket) { QQEventArgs <ModifyInfoReplyPacket, ModifyInfoPacket> e = new QQEventArgs <ModifyInfoReplyPacket, ModifyInfoPacket>(client, inPacket, outPacket); if (inPacket.Success) { client.PrivateManager.OnModifyInfoSuccessed(e); } else { client.PrivateManager.OnModifyInfoFailed(e); } }
/// <summary>修改个人信息或密码 /// Modifies the info. /// </summary> /// <param name="oldPassword">The old password.老密码,如果不修改密码,设成null</param> /// <param name="newPassword">The new password.新密码,如果不修改密码,设成null</param> /// <param name="contactInfo">The contact info.</param> private void ModifyInfo(string oldPassword, string newPassword, ContactInfo contactInfo) { ModifyInfoPacket packet = new ModifyInfoPacket(QQUser); packet.OldPassword = oldPassword; packet.NewPassword = newPassword; string[] infos = contactInfo.GetInfoArray(); for (int i = 0; i < QQGlobal.QQ_COUNT_MODIFY_USER_INFO_FIELD; i++) { if (infos[i] == "-") { infos[i] = ""; } } packet.ContactInfo = contactInfo; QQClient.PacketManager.SendPacket(packet, QQPort.Main.Name); }