Example #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);
        }
Example #2
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);
        }
Example #3
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);
        }
Example #4
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);
        }
Example #5
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);
        }
Example #6
0
        public bool IsLogined(GeckoDocument doc)
        {
            return(WebRule.existElement(doc, GobalSetting.LoginedFlag));

            return(doc?.GetElementById(GobalSetting.LoginedFlag) != null);
        }