Пример #1
0
        protected virtual string ParseGameAccountDetail(string content)
        {
            StringBuilder sb = new StringBuilder();

            if (this.IsContains(content, "This account has been temporarily disabled",
                                "Account Banned", "您無法登入此頁面,因為此協議已被禁止、鎖住或停用"))
            {
                return(CommentAttributeGetter.GetAttribute <WowLoginStates>(WowLoginStates.TempDisabled));
            }
            if (this.IsContains(content, "section account-details"))
            {
                string outterHtml = HtmlParser.GetOuterTextFromHtml("section account-details", "<dl>", "</dl>", 1, content);
                if (!string.IsNullOrEmpty(outterHtml))
                {
                    sb.AppendLine(HtmlParser.GetInnerTextFromHtml(outterHtml));
                }
            }

            if (this.IsContains(content, "subscriptionData"))
            {
                string outterHtml = HtmlParser.GetOuterTextFromHtml("subscriptionData", "<table>", "</table>", 1, content);
                if (!string.IsNullOrEmpty(outterHtml))
                {
                    sb.AppendLine(HtmlParser.GetInnerTextFromHtml(outterHtml));
                }
            }

            return(sb.ToString());
        }
Пример #2
0
        protected void SaveBattleChar()
        {
            if ((null != this.curretnAccountItem))
            {
                if ((null != battleCharList) && (battleCharList.Count > 0))
                {
                    StringBuilder sb = new StringBuilder();
                    sb.AppendLine(curretnAccountItem.UserDetail);
                    int count = 0;
                    BattleOutptMgt.Instance.LevelDetailCount += battleCharList.Count;

                    battleCharList.Sort(new CharItemComparer <BattleCharItem>());
                    foreach (BattleCharItem ci in battleCharList)
                    {
                        sb.AppendLine(string.Format("\t{0}、{1}", (++count).ToString().PadRight(2, ' '), ci.ToString()));
                    }
                    battleCharList.Clear();
                    BattleOutptMgt.Instance.OuputCharacter(sb.ToString(), CharacterType.Battle, this.DetectionParamsItem);
                }
                else if (this.curretnAccountItem.IsCanGetDetail)
                {
                    string        s  = string.Format("{0}", CommentAttributeGetter.GetAttribute <WowLoginStates>(WowLoginStates.NoCharacter));
                    StringBuilder sb = new StringBuilder();
                    sb.Append(curretnAccountItem.UserDetail);
                    sb.Append(",{ " + s + " }");
                    BattleOutptMgt.Instance.OuputCharacter(sb.ToString(), CharacterType.Battle, this.DetectionParamsItem);
                }
            }
        }