예제 #1
0
        public double GetCurrMoney(GeckoDocument doc)
        {
            string outval = "";
            bool   succ   = WebRule.existElement(doc, GobalSetting.AmountId, out outval);

            if (succ)
            {
                double outRes = 0.00;
                if (double.TryParse(outval, out outRes))
                {
                    return(outRes);
                }
                return(0);
            }
            return(0);

            GeckoElement ElPoint = doc?.GetElementById(GobalSetting.AmountId);
            double       ret     = 0;

            if (ElPoint != null)
            {
                double.TryParse(ElPoint?.TextContent, out ret);
            }
            return(ret);
        }
예제 #2
0
 public LotteryConfigClass_GDKL11(WebRule we, LotteryTypes rs, string name) : base(we, rs, name)
 {
     //cRuleId_S = rules.AllRules["34140101"].BetRule;
     //cRuleId_B = rules.AllRules["34140102"].BetRule;
     //g01_00 = "8010101";//猜冠军
     //g0102_00 = "8020101";//猜冠亚军
     //g0102_01 = "8020201";//猜冠亚军单式
     //cRuleId_S = "8140101";// '前5位定胆
     //cRuleId_B = "8140102";// '后5位定胆
 }
예제 #3
0
        public bool IsLoadCompleted(GeckoDocument indoc)
        {
            string strNotice = GobalSetting.HostKey;

            return(WebRule.existElement(indoc, GobalSetting.HostKey));


            if (indoc.Head.OuterHtml.IndexOf(strNotice) > 0)
            {
                return(true);
            }
            return(false);
        }
예제 #4
0
 public PK10KindLotteryConfigClass(WebRule we, LotteryTypes rs, string name) : base(we, rs, name)
 {
     g01_00   = "8010101"; //猜冠军
     g0102_00 = "8020101"; //猜冠亚军
     g0102_01 = "8020201"; //猜冠亚军单式
     //cRuleId_S = "8140101";// '前5位定胆
     //cRuleId_B = "8140102";// '后5位定胆
     if (rules.AllRules.ContainsKey("8140101"))
     {
         cRuleId_S = rules.AllRules["8140101"].BetRule;
     }
     if (rules.AllRules.ContainsKey("8140102"))
     {
         cRuleId_B = rules.AllRules["8140102"].BetRule;
     }
 }
예제 #5
0
        public bool IsLogined(HtmlDocument doc)
        {
            bool suc = WebRule.existElement(doc, GobalSetting.LoginedFlag);

            if (suc)
            {
                return(suc);
            }
            for (int i = 0; i < doc.Window.Frames.Count; i++)
            {
                suc = WebRule.existElement(doc.Window.Frames[i].Document, GobalSetting.LoginedFlag);
                if (suc)
                {
                    return(true);
                }
            }
            return(false);
        }
예제 #6
0
        public bool IsLoadCompleted(HtmlDocument indoc)
        {
            string strNotice = GobalSetting.HostKey;
            bool   suc       = WebRule.existElement(indoc, GobalSetting.HostKey);

            if (suc)
            {
                return(true);
            }
            for (int i = 0; i < indoc.Window.Frames.Count; i++)
            {
                suc = WebRule.existElement(indoc.Window.Frames[i].Document, GobalSetting.HostKey);
                if (suc)
                {
                    return(true);
                }
            }
            return(false);
        }
예제 #7
0
        public static WebRule Create(GlobalClass gc)
        {
            WebRule ret = null;

            switch (gc.InstFormat.ToLower().Trim())
            {
            case "kcai":
            {
                ret = new Rule_ForKcaiCom(gc.InstFormat, gc);
                break;
            }

            default:
            {
                ret = new JsProcessRuleClass(gc.InstFormat, gc);
                break;
            }
            }

            return(ret);
        }
예제 #8
0
        public double GetCurrMoney(HtmlDocument doc)
        {
            string outval = "";
            bool   succ   = WebRule.existElement(doc, GobalSetting.AmountId, out outval);

            if (succ)
            {
                double outRes = 0.00;
                if (double.TryParse(outval, out outRes))
                {
                    return(outRes);
                }
                return(0);
            }
            for (int i = 0; i < doc.Window.Frames.Count; i++)
            {
                succ = WebRule.existElement(doc.Window.Frames[i].Document, GobalSetting.AmountId, out outval);
                if (succ)
                {
                    double outRes = 0.00;
                    if (double.TryParse(outval, out outRes))
                    {
                        return(outRes);
                    }
                    //return 0;
                }
            }
            return(0);

            HtmlElement ElPoint = doc?.GetElementById(GobalSetting.AmountId);
            double      ret     = 0;

            if (ElPoint != null)
            {
                double.TryParse(ElPoint?.InnerText, out ret);
            }
            return(ret);
        }
예제 #9
0
        public bool IsLogined(GeckoDocument doc)
        {
            return(WebRule.existElement(doc, GobalSetting.LoginedFlag));

            return(doc?.GetElementById(GobalSetting.LoginedFlag) != null);
        }
예제 #10
0
 public XxYLotteryConfigClass(WebRule we, LotteryTypes rs, string name) : base(we, rs, name)
 {
 }
예제 #11
0
 public string g0102_01 = "8020201"; //猜冠亚军单式
 protected F2LotteryyConfigClass(WebRule we, LotteryTypes rs, string name) : base(we, rs, name)
 {
 }
예제 #12
0
 protected LotteryConfigClass(WebRule we, LotteryTypes rs, string name)
 {
     rules = rs;
     wr    = we;
     Name  = name;
 }