protected void OutputByRegion(UserAccountItem userItem)
        {
            lock (region)
            {
                string s = userItem.ToString();
                if ((null != userItem))
                {
                    StreamWriter sw = null;
                    if (TextHelper.IsContains(s, "(US)"))
                    {
                        sw = this.GetStream(SUCCEED_US);
                    }
                    else if (TextHelper.IsContains(s, "(EU)"))
                    {
                        sw = this.GetStream(SUCCEED_EU);
                    }

                    if (sw == null)
                    {
                        LogManager.Error("Account output US/EU account failed,that's other country account!");
                        return;
                    }

                    this.Output(s, sw);
                }
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Get all outer text from html, and text contains containSymbol
 /// </summary>
 /// <param name="startSymbol"></param>
 /// <param name="endSymbol"></param>
 /// <param name="rawContent"></param>
 /// <returns></returns>
 public IList <string> GetOuterTextFromHtml(string startSymbol, string endSymbol, string containSymbol, string rawContent)
 {
     lock (lockOuterTextObject)
     {
         IList <string> itemList = new List <string>();
         while (rawContent.IndexOf(startSymbol) != -1)
         {
             string item = this.GetOuterTextFromHtml(startSymbol, endSymbol, 1, rawContent);
             if (!string.IsNullOrEmpty(item))
             {
                 rawContent = rawContent.Replace(item, "");
                 if (TextHelper.IsContains(item, containSymbol))
                 {
                     itemList.Add(item);
                 }
             }
             else
             {
                 break;
             }
         }
         return(itemList);
     }
 }
Esempio n. 3
0
        public string GetAccountState()
        {
            string str = "正常";

            if (string.IsNullOrEmpty(this.Detail))
            {
                if (TextHelper.IsContains(this.Edition, "Trial", "體驗帳號", "試玩", "已到期", "測試伺服器", "public test realm"))
                {
                    str = string.Format(" {0}", CommentAttributeGetter.GetAttribute <WowLoginStates>(WowLoginStates.Trial));
                }
                else if (TextHelper.IsContains(this.Edition, "Locked", "Banned", "Cerrada", "Account Banned", "暂时卦号"))
                {
                    str = string.Format(" {0}", CommentAttributeGetter.GetAttribute <WowLoginStates>(WowLoginStates.TempDisabled));
                }
                else if (TextHelper.IsContains(this.Edition, "EINGEFROREN", "FROZEN", "已凍結"))
                {
                    str = string.Format(" {0}", CommentAttributeGetter.GetAttribute <WowLoginStates>(WowLoginStates.Frozen));
                }
                else if (TextHelper.IsContains(this.Edition, "Active", "已取消", "啟動"))
                {
                    str = string.Format(" {0}", CommentAttributeGetter.GetAttribute <WowLoginStates>(WowLoginStates.Active));
                }

                if (TextHelper.IsContains(this.Region, "Americas", "Oceania (US)", "(US)", "美國"))
                {
                    str += "(US)";
                }
                else if (TextHelper.IsContains(this.Region, "Europe (EU)", "Europe", "(EU)"))
                {
                    str += "(EU)";
                }
                else if (TextHelper.IsContains(this.Region, "Россия и СНГ (RU)", "(RU)"))
                {
                    str += "(RU)";
                }
                return(str);
            }

            if (TextHelper.IsContains(this.Detail, "(  Trial  )", "(體驗帳號)", "(試玩)", "(已到期)",
                                      "測試伺服器", "public test realm", "新手入門版"))
            {
                str = string.Format(" {0}", CommentAttributeGetter.GetAttribute <WowLoginStates>(WowLoginStates.Trial));
            }
            else if (TextHelper.IsContains(this.Detail, "Locked", "Banned", "Cerrada", "Account Banned", "暂时卦号"))
            {
                str = string.Format(" {0}", CommentAttributeGetter.GetAttribute <WowLoginStates>(WowLoginStates.TempDisabled));
            }
            else if (TextHelper.IsContains(this.Detail, "EINGEFROREN", "FROZEN", "已凍結"))
            {
                str = string.Format(" {0}", CommentAttributeGetter.GetAttribute <WowLoginStates>(WowLoginStates.Frozen));
            }
            else if (TextHelper.IsContains(this.Detail, "Active", "已取消", "啟動"))
            {
                str = string.Format(" {0}", CommentAttributeGetter.GetAttribute <WowLoginStates>(WowLoginStates.Active));
            }
            else if (TextHelper.IsContains(this.Detail, "立即購買《暗黑破壞神"))
            {
                str = string.Format(" {0}", CommentAttributeGetter.GetAttribute <WowLoginStates>(WowLoginStates.InvalidAccount));
            }

            if (TextHelper.IsContains(this.Detail, "Americas", "Oceania (US)", "(US)", "美國"))
            {
                str += "(US)";
            }
            else if (TextHelper.IsContains(this.Detail, "Europe (EU)", "Europe", "(EU)"))
            {
                str += "(EU)";
            }
            else if (TextHelper.IsContains(this.Detail, "Россия и СНГ (RU)", "(RU)"))
            {
                str += "(RU)";
            }

            return(str);
        }