Esempio n. 1
0
        public ConfigurationStatus.PTPrizeGroup GetPlayMethodGroup(ConfigurationStatus.LotteryType pType, string playName)
        {
            ConfigurationStatus.PTPrizeGroup group = null;
            string playString = this.GetPlayString(playName);

            if (base.PlayMethodGroupDic.ContainsKey(playString))
            {
                group = base.PlayMethodGroupDic[playString];
            }
            return(group);
        }
Esempio n. 2
0
        public override string GetPlayMethodID(ConfigurationStatus.LotteryType pType, string playName)
        {
            List <int> pIndexList = new List <int>();

            if (CommFunc.CheckPlayIsRX(playName))
            {
                int count = CommFunc.GetPlayInfo(playName).IndexList.Count;
                for (int i = 0; i < count; i++)
                {
                    pIndexList.Add(i);
                }
            }
            ConfigurationStatus.PTPrizeGroup group = this.GetPlayMethodGroup(pType, playName, pIndexList);
            return((group == null) ? "" : group.PlayID);
        }
Esempio n. 3
0
        public ConfigurationStatus.PTPrizeGroup GetPlayMethodGroup(ConfigurationStatus.LotteryType pType, string playName, List <int> pIndexList)
        {
            ConfigurationStatus.PTPrizeGroup group = null;
            string playString = this.GetPlayString(playName);
            string rXWZString = this.GetRXWZString(pIndexList);

            if (CommFunc.CheckPlayIsRX(playName))
            {
                playString = string.Format(playString, rXWZString);
            }
            if (base.PlayMethodGroupDic.ContainsKey(playString))
            {
                group = base.PlayMethodGroupDic[playString];
            }
            return(group);
        }
Esempio n. 4
0
        public override void CountPrizeDic(string pResponseText)
        {
            base.PlayMethodGroupDic.Clear();
            base.PrizeDic.Clear();
            pResponseText = CommFunc.GetIndexString(pResponseText, "var navListJson = '", "]}]}]}]';", 0);
            List <string> list = CommFunc.SplitString(pResponseText, "]}]}]},{", -1);

            for (int i = 0; i < list.Count; i++)
            {
                string        pStr  = list[i];
                string        str2  = CommFunc.GetIndexString(pStr, "\"N\":\"", "\"", 0);
                List <string> list2 = CommFunc.SplitString(pStr.Substring(pStr.IndexOf("{\"N\":\"")), "}]}]},{", -1);
                for (int j = 0; j < list2.Count; j++)
                {
                    string        str3  = list2[j];
                    string        str4  = CommFunc.GetIndexString(str3, "\"N\":\"", "\"", 0);
                    List <string> list3 = CommFunc.SplitString(str3.Substring(str3.IndexOf("\"C\"")), "]},{", -1);
                    for (int k = 0; k < list3.Count; k++)
                    {
                        string        str5  = list3[k];
                        string        str6  = CommFunc.GetIndexString(str5, "\"N\":\"", "\"", 0);
                        List <string> list4 = CommFunc.SplitString(str5.Substring(str5.IndexOf("\"TP\"")), "},{", -1);
                        for (int m = 0; m < list4.Count; m++)
                        {
                            string str7 = list4[m];
                            string str8 = CommFunc.GetIndexString(str7, "\"N\":\"", "\"", 0);
                            ConfigurationStatus.PTPrizeGroup group = new ConfigurationStatus.PTPrizeGroup();
                            string str9 = CommFunc.GetIndexString(str7, "\"I\":", ",", 0);
                            group.PlayID   = str9;
                            group.PlayName = $"{str2}-{str4}-{str6}-{str8}";
                            base.PlayMethodGroupDic[group.PlayName] = group;
                            base.PrizeDic[str9] = Convert.ToDouble(CommFunc.GetIndexString(str7, "\"MxO\":\"", "\"", 0)).ToString();
                        }
                    }
                }
            }
        }
Esempio n. 5
0
 public string GetPlayMethodID1(ConfigurationStatus.LotteryType pType, string playName, List <int> pIndexList)
 {
     ConfigurationStatus.PTPrizeGroup group = this.GetPlayMethodGroup(pType, playName, pIndexList);
     return((group == null) ? "" : group.PlayID);
 }
Esempio n. 6
0
 public override string GetPlayMethodID(ConfigurationStatus.LotteryType pType, string playName)
 {
     ConfigurationStatus.PTPrizeGroup playMethodGroup = this.GetPlayMethodGroup(pType, playName);
     return((playMethodGroup == null) ? "" : playMethodGroup.PlayID);
 }