Example #1
0
 private void PropitiateSlaves()
 {
     try
     {
         SetMessageLn("安抚奴隶:");
         int num = 0;
         foreach (FriendInfo slave in this._mySlaveList)
         {
             SetMessageLn(string.Format("奴隶#{0}:{1} ", ++num, slave.Name));
             //string content = HH.Get(string.Format("http://www.kaixin001.com/slave/comfort1.php?verify={0}&slaveuid={1}&comforttype={2}", this._verifyCode, slave.Id.ToString(), GetComfortType(slave.Id.ToString(), !slave.Gender)));
             string comfortType = GetComfortType(slave.Id.ToString(), !slave.Gender);
             HH.DelayedTime = Constants.DELAY_1SECONDS;
             string content = HH.Post("http://www.kaixin001.com/slave/comfort1.php", string.Format("verify={0}&slaveuid={1}&comforttype={2}", this._verifyCode, slave.Id.ToString(), comfortType));
             this.GetFeedback(content);
         }
     }
     catch (ThreadAbortException)
     {
         throw;
     }
     catch (ThreadInterruptedException)
     {
         throw;
     }
     catch (Exception ex)
     {
         LogHelper.Write("GameSlave.PropitiateSlaves", ex, LogSeverity.Error);
         SetMessage(" 安抚奴隶失败!错误:" + ex.Message);
     }
 }
Example #2
0
        private BiteStatus BiteTheFriend(int id)
        {
            if (id <= 0)
            {
                return(BiteStatus.Unknown);
            }
            SetMessageLn(string.Format("咬 {0}:", this.GetFriendNameById(id)));
            if (Operation.BiteBlackList.Contains(id))
            {
                SetMessage(" 在不被咬名单中,不咬 ");
                return(BiteStatus.InBlackList);
            }

            string content = RequestBiteStyle(id.ToString());
            string param   = string.Format("verify={0}&touid={1}&style={2}&position={3}&acc={4}", new object[] { this._verifyCode, id.ToString(), GetBiteStyle(content), GetBitePosition(content), this._biteAcc });

            for (int ix = 0; ix < 2; ix++)
            {
                HH.DelayedTime = Constants.DELAY_4SECONDS;
                content        = HH.Post("http://www.kaixin001.com/bite/bite.php", param);
                string ret = this.GetBiteFeedBack(content);
                if (ret.StartsWith("你的体力已几乎耗尽,需要休息") || ret.Contains("你的体力已耗尽,需要休息"))
                {
                    if (!this.StartRecover())
                    {
                        return(BiteStatus.NoRoom);
                    }
                    else
                    {
                        return(BiteStatus.IsRecovering);
                    }
                }
            }
            return(BiteStatus.Healthy);
        }
Example #3
0
        private void FawnMaster()
        {
            try
            {
                SetMessageLn("讨好主人:");

                if (_hostuid == -1)
                {
                    SetMessageLn("目前我是自由身!");
                    return;
                }
                //string content = HH.Get(string.Format("http://www.kaixin001.com/slave/fawn1.php?verify={0}&hostuid={1}&fawntype={2}", this._verifyCode, this._hostuid.ToString(), GetFawnType()));
                string fawnType = GetFawnType();
                HH.DelayedTime = Constants.DELAY_1SECONDS;
                string content = HH.Post("http://www.kaixin001.com/slave/fawn1.php", string.Format("verify={0}&hostuid={1}&fawntype={2}", this._verifyCode, this._hostuid.ToString(), fawnType));
                this.GetFeedback(content);
            }
            catch (ThreadAbortException)
            {
                throw;
            }
            catch (ThreadInterruptedException)
            {
                throw;
            }
            catch (Exception ex)
            {
                LogHelper.Write("GameSlave.FawnMaster", ex, LogSeverity.Error);
                SetMessage(" 讨好主人失败!错误:" + ex.Message);
            }
        }
Example #4
0
        private bool BuyTheSlave(int slaveuid)
        {
            if (Operation.BuyBlackList.Contains(slaveuid))
            {
                SetMessage("#" + GetFriendNameById(slaveuid) + ",不购买黑名单里的奴隶 ");
                return(false);
            }
            string slaveNick = Task.NickName;

            if (slaveNick == null)
            {
                slaveNick = string.Empty;
            }
            else
            {
                slaveNick = DataConvert.GetEncodeData(slaveNick);
            }

            //get slave info
            HH.DelayedTime = Constants.DELAY_2SECONDS;
            string content = HH.Get(string.Format("http://www.kaixin001.com/slave/buy_dialog.php?slaveuid={0}&verify={1}", slaveuid, this._verifyCode));

            if (!GetBuySlaveFeedback(content))
            {
                return(false);
            }

            //current price
            int slaveprice = JsonHelper.GetInteger(JsonHelper.GetMid(content, "你想花 <strong class=\"dgreen\">&yen;", "</strong> 的价格购买"));

            //request for buying
            string param = "verify=" + this._verifyCode + "&slaveuid=" + slaveuid + "&nick=" + slaveNick + "&acc=" + GetAccCode(content);

            HH.DelayedTime = Constants.DELAY_2SECONDS;
            content        = HH.Post("http://www.kaixin001.com/slave/buy.php", param);
            if (!GetBuySlaveFeedback(content))
            {
                return(false);
            }

            if (this.GetFeedback(content))
            {
                FriendInfo slave = new FriendInfo();
                slave.Id   = Convert.ToInt32(slaveuid);
                slave.Name = JsonHelper.GetMid(content, "<span class=\"sl\">", "<");
                if (slave.Name == null)
                {
                    slave.Name = string.Empty;
                }
                slave.Gender = JsonHelper.GetMid(content, "<br />同时,", "的") == "他" ? true : false;
                slave.Price  = JsonHelper.GetInteger(JsonHelper.GetMid(content, "&yen;", "<"));
                this._mySlaveList.Add(slave);
                this._slavecash -= slaveprice;
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #5
0
 private void ProtectFriend()
 {
     if (Operation.ProtectId != 0)
     {
         try
         {
             SetMessageLn("保护" + GetFriendNameById(Operation.ProtectId) + ":");
             string param = string.Format("verify={0}&touid={1}&_=", this._verifyCode, Operation.ProtectId);
             HH.DelayedTime = Constants.DELAY_2SECONDS;
             string content = HH.Post("http://www.kaixin001.com/bite/shield.php", param);
             //{"ret":"","prompt":"<div style='margin:20px 0 60px 60px;'><strong class='f14'>\u4f60\u5df2\u7ecf\u6210\u4e3a\u6731\u536b\u9752\u7684\u4fdd\u62a4\u5929\u4f7f\uff01<br>\u5982\u679c\u522b\u4eba\u6765\u54ac\u6731\u536b\u9752\uff0c\u4f60\u5c06\u66ff\u5979\u62b5\u6321\u4e00\u53e3\u3002<\/strong><\/div>"}
             JsonTextParser       parser  = new JsonTextParser();
             JsonObjectCollection objects = parser.Parse(content) as JsonObjectCollection;
             string ret = JsonHelper.FiltrateHtmlTags(JsonHelper.GetStringValue(objects["ret"]) + JsonHelper.GetStringValue(objects["prompt"]));
             SetMessage(ret);
         }
         catch (ThreadAbortException)
         {
             throw;
         }
         catch (ThreadInterruptedException)
         {
             throw;
         }
         catch (Exception ex)
         {
             LogHelper.Write("GameBite.ProtectFriend", ex, LogSeverity.Error);
             SetMessageLn("保护好友失败!错误:" + ex.Message);
         }
     }
 }
Example #6
0
        private void ApproveRecover(string content)
        {
            //var g_be_rest_agree = parseInt("1");  有人在我家休息,而且我已经同意
            //var g_be_rest_agree = parseInt("0");  有人在我家休息,但我还没同意
            //var g_be_rest_agree = parseInt("");  没有人在我家休息

            SetMessageLn("正在检查是否有人在我家休息...");

            try
            {
                string strStatus = JsonHelper.GetMid(content, "var g_be_rest_agree = parseInt(\"", "\")");
                if (strStatus == null || strStatus == "")
                {
                    SetMessage("没有人在我家休息");
                }
                else if (strStatus == "1")
                {
                    string message = JsonHelper.GetMid(content, "<div class=\"c hf_yr\" id=rest2div", "<div class=\"c hfb\">");
                    message = JsonHelper.GetMid(message, "<ul class=\"l\">", "</li>");
                    SetMessageLn(JsonHelper.FiltrateHtmlTags(message));
                }
                else
                {
                    string user   = JsonHelper.GetMid(content, "javascript:agree(", ")");
                    int    userid = JsonHelper.GetInteger(user);

                    string param;
                    string username = JsonHelper.GetMid(content, "\"sl\"><strong>", "</strong>");
                    SetMessage(string.Format("{0}正在我家休息", username));
                    if ((Operation.AllowRestList.Count <= 0) || Operation.AllowRestList.Contains(userid))
                    {
                        param          = "verify=" + this._verifyCode + "&touid=" + userid + "&agree=1";
                        HH.DelayedTime = Constants.DELAY_1SECONDS;
                        HH.Post("http://www.kaixin001.com/bite/agree.php", param);
                        SetMessage(string.Format(" 允许{0}在我家休息", username));
                    }
                    else
                    {
                        param          = "verify=" + this._verifyCode + "&touid=" + userid + "&agree=0";
                        HH.DelayedTime = Constants.DELAY_1SECONDS;
                        HH.Post("http://www.kaixin001.com/bite/agree.php", param);
                        SetMessage(string.Format(" 拒绝{0}在我家休息", username));
                    }
                }
            }
            catch (ThreadAbortException)
            {
                throw;
            }
            catch (ThreadInterruptedException)
            {
                throw;
            }
            catch (Exception ex)
            {
                LogHelper.Write("GameBite.ApproveRecover", content, ex, LogSeverity.Error);
                SetMessageLn("同意别人在我家休息失败!错误:" + ex.Message);
            }
        }
Example #7
0
        private void SellAsset()
        {
            //出售资产
            SetMessageLn("出售资产...");

            if (this._myAssetsList.Count <= 0)
            {
                SetMessage("你没有任何资产可以出售!");
                return;
            }

            int num = 0;

            foreach (MyAssetInfo myasset in this._myAssetsList)
            {
                try
                {
                    //诺亚方舟船票
                    if (myasset.IId == 145)
                    {
                        SetMessageLn(string.Format("#{0}诺亚方舟船票:价值100亿,无法出售,跳过", ++num));
                        continue;
                    }

                    if (_cantransaction == false)
                    {
                        return;
                    }

                    AssetInfo asset = GetAssetById(myasset.IId);
                    if (asset != null)
                    {
                        SetMessageLn(string.Format("#{0}{1} 购买价格:{2}元 当前价格:{3}元 数量:{4}", ++num, asset.Name, myasset.BuyPrice, myasset.CurrentPrice, myasset.AssetNum));
                        if (asset.SellPrice <= myasset.CurrentPrice)
                        {
                            SetMessage(string.Format(" 当前的价格{0} >= 推荐出售价格{1},尝试出售...", myasset.CurrentPrice, asset.SellPrice));
                            HH.DelayedTime = Constants.DELAY_2SECONDS;
                            string content = HH.Post(string.Format("http://www.kaixin001.com/!rich/!sell.php?iid={0}&cost_price={1}&sell_price={2}&t=0.9385619927258357", myasset.IId, myasset.BuyPrice, myasset.CurrentPrice), string.Format("iid={0}&num={1}&sell_price={2}", myasset.IId, myasset.AssetNum, myasset.CurrentPrice));
                            if (GetSellAssetFeedback(content))
                            {
                                _transactedasset = true;
                            }
                        }
                        else
                        {
                            SetMessage(string.Format(" 当前的价格{0} < 推荐出售价格{1},跳过", myasset.CurrentPrice, asset.SellPrice));
                        }
                    }
                }
                catch (Exception ex)
                {
                    LogHelper.Write("GameRich.SellAsset", ex, LogSeverity.Error);
                    continue;
                }
            }
        }
Example #8
0
        public string RequestRichHomePage(bool IsInitial)
        {
            string content = HH.Get("http://www.kaixin001.com/!rich/index.php");

            if (content.IndexOf("<title>添加组件 - 开心网</title>") != -1)
            {
                SetMessageLn("还未安装超级大亨组件,尝试安装中...");
                HH.Post("http://www.kaixin001.com/app/install.php", "aid=1092&isinstall=1");
                content = HH.Get("http://www.kaixin001.com/!rich/index.php");
            }
            this._verifyCode = JsonHelper.GetMid(content, "g_verify = \"", "\"");
            return(content);
        }
Example #9
0
        public string RequestBiteHomePage()
        {
            string content = HH.Get("http://www.kaixin001.com/app/app.php?aid=1048");

            if (content.IndexOf("<title>添加组件 - 开心网</title>") != -1)
            {
                SetMessageLn("还未安装咬人组件,尝试安装中...");
                HH.Post("http://www.kaixin001.com/app/install.php", "aid=1048&isinstall=1");
                content = HH.Get("http://www.kaixin001.com/app/app.php?aid=1048");
            }
            this._verifyCode = JsonHelper.GetMid(content, "g_verify = \"", "\"");
            return(content);
        }
Example #10
0
        private bool SendFriendRequest(int uid, string requestcontent)
        {
            string param   = string.Format("from=&touid={0}&content={1}", uid, DataConvert.GetEncodeData(requestcontent));
            string content = HH.Post("http://www.kaixin001.com/friend/addverify.php", param);

            if (content.IndexOf("var type = \"4\"") != -1)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #11
0
        public string RequestSlaveHomePage()
        {
            string content = HH.Get("http://www.kaixin001.com/app/app.php?aid=1028");

            if (content.IndexOf("<title>添加组件 - 开心网</title>") != -1)
            {
                SetMessageLn("还未安装朋友买卖组件,尝试安装中...");
                HH.Post("http://www.kaixin001.com/app/install.php", "aid=1028&isinstall=1");
                content = HH.Get("http://www.kaixin001.com/app/app.php?aid=1028");
            }
            this._verifyCode = JsonHelper.GetMid(content, "g_verify = \"", "\"");
            this._slavecash  = JsonHelper.GetInteger(JsonHelper.GetMid(content, "<p>现 金:<strong class=\"dgreen\">&yen;", "</strong></p>"));
            this._hostuid    = JsonHelper.GetInteger(JsonHelper.GetMid(content, "javascript:fawnHost(", ");"));
            return(content);
        }
Example #12
0
        private void BuyAssetAccordingCount(int assetid, string name, long purchaseprice, long count)
        {
            SetMessageLn(string.Format("购买{0}个{1}", count, name));
            HH.DelayedTime = Constants.DELAY_1SECONDS;
            HH.Get(string.Format("http://www.kaixin001.com/!rich/!purchase.php?iid={0}&purchase_price={1}&t=0.9090718055919508", assetid, purchaseprice));

            HH.DelayedTime = Constants.DELAY_2SECONDS;
            string content = HH.Post(string.Format("http://www.kaixin001.com/!rich/!purchase.php?iid={0}&purchase_price={1}&t=0.13999783978033764", assetid, purchaseprice), string.Format("iid={0}&purchase_price={1}&num={2}", assetid, purchaseprice, count));

            if (GetBuyAssetFeedback(content))
            {
                _isfirsttimebuy  = false;
                _transactedasset = true;
                _cash           -= count * purchaseprice;
            }
        }
Example #13
0
 private void ReleaseSlaves()
 {
     try
     {
         SetMessageLn("释放奴隶:");
         int  num  = 0;
         bool flag = false;
         foreach (FriendInfo slave in this._mySlaveList)
         {
             SetMessageLn(string.Format("奴隶#{0}:{1}(身价:¥{2}) ", ++num, slave.Name, slave.Price));
             HH.DelayedTime = Constants.DELAY_1SECONDS;
             string content = HH.Get(string.Format("http://www.kaixin001.com/slave/free_dialog.php?slaveuid={0}&verify={1}", slave.Id.ToString(), this._verifyCode));
             if (content.IndexOf("$(\"flag2\").style.display") != -1)
             {
                 string param = "verify=" + this._verifyCode + "&slaveuid=" + slave.Id.ToString();
                 HH.DelayedTime = Constants.DELAY_2SECONDS;
                 HH.Post("http://www.kaixin001.com/slave/free.php", param);
                 SetMessage("释放成功!");
                 flag = true;
             }
             else
             {
                 SetMessage("未满两天,不能释放!");
             }
         }
         if (flag)
         {
             string content = RequestSlaveHomePage();
             ReadSlaves(content, false);
         }
     }
     catch (ThreadAbortException)
     {
         throw;
     }
     catch (ThreadInterruptedException)
     {
         throw;
     }
     catch (Exception ex)
     {
         LogHelper.Write("GameSlave.ReleaseSlaves", ex, LogSeverity.Error);
         SetMessage(" 释放奴隶失败!错误:" + ex.Message);
     }
 }
Example #14
0
 private void AgreeFriend(string fuid, string smid)
 {
     try
     {
         HH.DelayedTime = Constants.DELAY_2SECONDS;
         string content = HH.Get(string.Format("http://www.kaixin001.com/friend/editfriend_dialog.php?smid={0}&fuid={1}", smid, fuid));
         string param   = string.Format("fuid={0}&byname=&memo=&groups=&allgroups=%E7%8E%B0%E5%9C%A8%E5%90%8C%E4%BA%8B%2C%E4%BB%A5%E5%89%8D%E5%90%8C%E4%BA%8B%2C%E5%A4%A7%E5%AD%A6%E5%90%8C%E5%AD%A6%2C%E9%AB%98%E4%B8%AD%E5%90%8C%E5%AD%A6%2C%E5%AE%B6%E4%BA%BA%E4%BA%B2%E6%88%9A%2C%E6%8C%9A%E4%BA%A4%E5%A5%BD%E5%8F%8B%2C%E6%99%AE%E9%80%9A%E6%9C%8B%E5%8F%8B%2C%E6%9C%8B%E5%8F%8B%E7%9A%84%E6%9C%8B%E5%8F%8B%2C%E5%85%B6%E4%BB%96&start=0&sysmsgtype=1&from=sysmsg&smid={1}", fuid, smid);
         HH.DelayedTime = Constants.DELAY_2SECONDS;
         HH.Post("http://www.kaixin001.com/friend/editfriend.php", param);
         SetMessageLn(string.Format("已同意{0}的好友请求!", this.GetFriendNameById(fuid)));
     }
     catch (OverflowException)
     {
     }
     catch (FormatException)
     {
     }
 }
Example #15
0
        private bool SendFriendRequest(string userid)
        {
            string content = HH.Get("http://www.kaixin001.com/home/?uid=" + userid);

            HH.DelayedTime = Constants.DELAY_2SECONDS;
            content        = HH.Get("http://www.kaixin001.com/friend/new.php?touid=" + userid, "http://www.kaixin001.com/home/?uid=" + userid);
            string param = string.Format("from=&touid={0}&content=hi&rcode=&code=&usercode=&email=&bidirection=", userid);

            HH.DelayedTime = Constants.DELAY_2SECONDS;
            content        = HH.Post("http://www.kaixin001.com/friend/addverify.php", "http://www.kaixin001.com/friend/new.php?touid=" + userid, param);

            if (content.IndexOf("var type = \"4\"") != -1)
            {
                return(true);
            }
            else
            {
                LogHelper.Write("ToolAddFriends.SendFriendRequest()", content, LogSeverity.Warn);
                return(false);
            }
        }
Example #16
0
 private bool RecoverInParticularRoom(int uid)
 {
     if (!Operation.RecoverBlackList.Contains(uid))
     {
         string param = string.Format("verify={0}&touid={1}&acc={2}", this._verifyCode, uid, _biteAcc);
         HH.DelayedTime = Constants.DELAY_4SECONDS;
         string content = HH.Post("http://www.kaixin001.com/bite/rest.php", param);
         content = this.GetBiteFeedBack(content);
         if ((content.StartsWith("你现在正在他家休息!") || content.StartsWith("你已经在")) || (content.IndexOf("开始恢复体力") != -1))
         {
             SetMessageLn("你已经在" + GetFriendNameById(uid) + "的房间休息,开始恢复体力。");
             //if (Task.SendRemindMessage)
             //{
             //    RequestMessageSending(uid.ToString(), Task.MessageContent);
             //    SetMessageLn("已经给" + GetFriendNameById(uid) + "发送消息提醒对方!");
             //}
             return(true);
         }
     }
     return(false);
 }
Example #17
0
 private void AfflictSlaves()
 {
     try
     {
         SetMessageLn("整奴隶:");
         int    num      = 0;
         string paintype = "";
         foreach (FriendInfo slave in this._mySlaveList)
         {
             SetMessageLn(string.Format("奴隶#{0}:{1} ", new object[] { ++num, slave.Name }));
             //6 去黑煤窑挖煤
             //8 去歌厅卖唱
             //paintype = (slave.Gender) ? "6" : "8";
             //18 去挑大粪
             //17 去当小保姆
             paintype = (slave.Gender) ? "18" : "17";
             //string content = HH.Get(string.Format("http://www.kaixin001.com/slave/pain2.php?verify={0}&slaveuid={1}&paintype={2}", this._verifyCode, slave.Id.ToString(), paintype));
             HH.DelayedTime = Constants.DELAY_2SECONDS;
             string content = HH.Post("http://www.kaixin001.com/slave/pain2.php", string.Format("verify={0}&slaveuid={1}&paintype={2}", this._verifyCode, slave.Id.ToString(), paintype));
             if (!IsSuffering(content))
             {
                 HH.DelayedTime = Constants.DELAY_1SECONDS;
                 content        = HH.Post("http://www.kaixin001.com/slave/pain1_submit.php", string.Format("verify={0}&slaveuid={1}&paintype={2}", this._verifyCode, slave.Id.ToString(), paintype));
                 if (content.IndexOf("pain1.php") != -1)
                 {
                     //<input type=hidden name=verify value=\"2588258_1028_2588258_1229396025_666b8495bee2045945861962214f4b81\">
                     //<input type=hidden name=slaveuid value=\"1534333\">
                     //<input type=hidden name=paintype value=\"17\">
                     //<input type=hidden name=hour value="3">
                     //<input type=hidden name=diffprice value=\"\">
                     //<input type=hidden name=paintimes value=\"1\">
                     //<input type=hidden name=endtime value=\"\">
                     //<input type=hidden name=flag value=\"right17\">
                     //<input type=hidden name=actionpart1 value=\"\">
                     //<input type=hidden name=actionpart2 value=\"\">
                     string hour        = JsonHelper.GetMid(content, "name=hour value=\"", "\">");
                     string diffprice   = JsonHelper.GetMid(content, "name=diffprice value=\"", "\">");
                     string paintimes   = JsonHelper.GetMid(content, "name=paintimes value=\"", "\">");
                     string endtime     = JsonHelper.GetMid(content, "name=endtime value=\"", "\">");
                     string flag        = JsonHelper.GetMid(content, "name=flag value=\"", "\">");
                     string actionpart1 = JsonHelper.GetMid(content, "name=actionpart1 value=\"", "\">");
                     string actionpart2 = JsonHelper.GetMid(content, "name=actionpart2 value=\"", "\">");
                     HH.DelayedTime = Constants.DELAY_1SECONDS;
                     content        = HH.Post("http://www.kaixin001.com/slave/pain1.php", string.Format("verify={0}&slaveuid={1}&paintype={2}&hour={3}&diffprice={4}&paintimes={5}&endtime={6}&flag={7}&actionpart1={8}&actionpart2={9}", this._verifyCode, slave.Id.ToString(), paintype, hour, diffprice, paintimes, endtime, flag, actionpart1, actionpart2));
                 }
             }
             this.GetFeedback(content);
         }
     }
     catch (ThreadAbortException)
     {
         throw;
     }
     catch (ThreadInterruptedException)
     {
         throw;
     }
     catch (Exception ex)
     {
         LogHelper.Write("GameSlave.AfflictSlaves", ex, LogSeverity.Error);
         SetMessage(" 整奴隶失败!错误:" + ex.Message);
     }
 }
Example #18
0
        private void RunAddFriend()
        {
            TryCatchBlock th = new TryCatchBlock(delegate
            {
                _module = Constants.MSG_ADDFRIENDS;

                SetMessageLn("开始互加好友...");

                if (_addFriends.DeleteAllMessages)
                {
                    SetMessageLn("清空所有账号的系统消息");
                    int num = 0;
                    foreach (AccountInfo account in _addFriends.Accounts)
                    {
                        num++;
                        SetMessageLn("正在清空#" + num + ":" + account.UserName + "(" + account.Email + ")" + "的所有系统消息...");
                        if (!this.ValidationLogin(account, false))
                        {
                            //SetMessageLn(account.UserName + "(" + account.Email + ")" + "登录失败!");
                            continue;
                        }
                        HH.Post("http://www.kaixin001.com/msg/clear_sys_msg.php", "");
                        SetMessageLn(account.UserName + "(" + account.Email + ")" + "的所有系统消息已被删除!");
                    }
                }

                if (!_addFriends.ExecuteSendRequest && !_addFriends.ExecuteConfirmRequest)
                {
                    return;
                }

                if (_addFriends.AddMode)
                {
                    int num;
                    if (_addFriends.ExecuteSendRequest)
                    {
                        SetMessageLn("发送添加好友请求:");
                        num = 0;
                        for (int ix = 0; ix < _addFriends.Accounts.Count; ix++)
                        {
                            num++;
                            SetMessageLn("账号#" + num + ":" + _addFriends.Accounts[ix].UserName + "(" + _addFriends.Accounts[ix].Email + ")" + "开始发送请求...");
                            if (!this.ValidationLogin(_addFriends.Accounts[ix], true))
                            {
                                continue;
                            }

                            string content = RequestAllMyFriends();
                            ReadAllMyFriends(content, false);

                            int newcount = 0;
                            for (int iy = ix + 1; iy < _addFriends.Accounts.Count; iy++)
                            {
                                if (!IsAlreadyMyFriend(_addFriends.Accounts[iy].UserId))
                                {
                                    newcount++;
                                    SetMessageLn(string.Format("添加好友请求#{0} {1}({2}) :", newcount.ToString(), _addFriends.Accounts[iy].UserName, _addFriends.Accounts[iy].UserId));
                                    if (this.SendFriendRequest(_addFriends.Accounts[iy].UserId))
                                    {
                                        SetMessage("成功!");
                                    }
                                    else
                                    {
                                        SetMessage("失败!");
                                    }
                                }
                            }
                        }
                    }

                    if (_addFriends.ExecuteConfirmRequest)
                    {
                        SetMessageLn("确认好友请求:");
                        num = 0;
                        foreach (AccountInfo account in _addFriends.Accounts)
                        {
                            num++;
                            SetMessageLn("账号#" + num + ":" + account.UserName + "(" + account.Email + ")" + "开始确认请求...");
                            if (!this.ValidationLogin(account, true))
                            {
                                continue;
                            }
                            this.ConfirmFriend();
                        }
                    }
                }
                else
                {
                    int num;
                    if (_addFriends.ExecuteSendRequest)
                    {
                        SetMessageLn("发送添加好友请求:");
                        num = 0;
                        foreach (AccountInfo account in _addFriends.NewAccountsList)
                        {
                            num++;
                            SetMessageLn("新账号#" + num + ":" + account.UserName + "(" + account.Email + ")" + "开始发送请求...");
                            if (!this.ValidationLogin(account, true))
                            {
                                continue;
                            }

                            this.AddAllList(account, _addFriends.NewAccountsList, true);
                            this.AddAllList(account, _addFriends.OldAccountsList, false);
                        }
                    }

                    if (_addFriends.ExecuteConfirmRequest)
                    {
                        SetMessageLn("确认好友请求:");
                        num = 0;
                        foreach (AccountInfo account in _addFriends.NewAccountsList)
                        {
                            num++;
                            SetMessageLn("新账号#" + num + ":" + account.UserName + "(" + account.Email + ")" + "开始确认请求...");
                            if (!this.ValidationLogin(account, true))
                            {
                                continue;
                            }
                            this.ConfirmFriend();
                        }
                        num = 0;
                        foreach (AccountInfo account in _addFriends.OldAccountsList)
                        {
                            num++;
                            SetMessageLn("旧账号#" + num + ":" + account.UserName + "(" + account.Email + ")" + "开始确认请求...");
                            if (!this.ValidationLogin(account, true))
                            {
                                continue;
                            }
                            this.ConfirmFriend();
                        }
                    }
                }

                SetMessageLn("互加好友完成!");
                if (AddFriendsFinished != null)
                {
                    AddFriendsFinished();
                }
            });

            base.ExecuteTryCatchBlock(th, "发生异常,互加好友失败!");
        }