コード例 #1
0
        /// <summary>
        /// 开奖趋势分析
        /// </summary>
        private void analyzeTendency(Lottery lottery, Tendency tendency, int index1, int index2)
        {
            tendency.ClearTendencys();//清空记录
            TendencyModel tm;

            AnalyzeTendency at = new AnalyzeTendency();

            for (int i = lottery.Lt_Lotterys.Count - 1; i >= 0; i--)
            {
                tm          = new TendencyModel();
                tm.ID       = i + 1;
                tm.Lottery  = lottery.Lt_Lotterys[i].Lottery;
                tm.Big      = at.BigNum(lottery.Lt_Lotterys, i, index1, index2);          //大大
                tm.BigSmall = at.BigSmallNum(lottery.Lt_Lotterys, i, index1, index2);     //大小
                tm.SmallBig = at.SmallBigNum(lottery.Lt_Lotterys, i, index1, index2);     //小大
                tm.Small    = at.SmallNum(lottery.Lt_Lotterys, i, index1, index2);        //小小

                tm.Odd     = at.OddPairNum(lottery.Lt_Lotterys, i, index1, index2, 1, 1); //奇奇
                tm.OddPair = at.OddPairNum(lottery.Lt_Lotterys, i, index1, index2, 1, 0); //奇偶
                tm.PairOdd = at.OddPairNum(lottery.Lt_Lotterys, i, index1, index2, 0, 1); //偶奇
                tm.Pair    = at.OddPairNum(lottery.Lt_Lotterys, i, index1, index2, 0, 0); //偶偶
                tm.Dbl     = at.DblNum(lottery.Lt_Lotterys, i, index1, index2);           //重数

                tm.SNO   = (lottery.Lt_Lotterys[i].Sno.ToString() + "期").PadLeft(5, '0');
                tm.Dtime = lottery.Lt_Lotterys[i].Dtime;

                tendency.AddTendency(tm);//添加趋势记录
            }
        }
コード例 #2
0
        /// <summary>
        /// 前二、后二开奖趋势分析
        /// </summary>
        private void analyzeTendency()
        {
            Tendency.ClearTendencys();//清空记录
            TendencyModel tm;

            AnalyzeTendency at = new AnalyzeTendency();

            for (int i = Lottery.Lt_Lotterys.Count - 1; i >= 0; i--)
            {
                tm          = new TendencyModel();
                tm.ID       = i + 1;
                tm.Big      = at.BigNum(i, xscpStyle.num1, xscpStyle.num2);          //大大
                tm.BigSmall = at.BigSmallNum(i, xscpStyle.num1, xscpStyle.num2);     //大小
                tm.SmallBig = at.SmallBigNum(i, xscpStyle.num1, xscpStyle.num2);     //小大
                tm.Small    = at.SmallNum(i, xscpStyle.num1, xscpStyle.num2);        //小小

                tm.Odd     = at.OddPairNum(i, xscpStyle.num1, xscpStyle.num2, 1, 1); //奇奇
                tm.OddPair = at.OddPairNum(i, xscpStyle.num1, xscpStyle.num2, 1, 0); //奇偶
                tm.PairOdd = at.OddPairNum(i, xscpStyle.num1, xscpStyle.num2, 0, 1); //偶奇
                tm.Pair    = at.OddPairNum(i, xscpStyle.num1, xscpStyle.num2, 0, 0); //偶偶
                tm.Dbl     = at.DblNum(i, xscpStyle.num1, xscpStyle.num2);           //重数

                tm.SNO = (Lottery.Lt_Lotterys[i].sno.ToString() + "期").PadLeft(5, '0');
                tm.Dt  = getDate(Lottery.Lt_Lotterys[i].sno);

                Tendency.AddTendency(tm);//添加趋势记录
            }
        }
コード例 #3
0
ファイル: FormStatistics.cs プロジェクト: xh330786390/XSCP
        /// <summary>
        /// 前二、后二开奖趋势分析
        /// </summary>
        private void analyzeTendency()
        {
            Tendency.ClearTendencys();//清空记录
            TendencyModel tm;

            AnalyzeTendency at = new AnalyzeTendency();

            for (int i = Lottery.Lt_Lotterys.Count - 1; i >= 0; i--)
            {
                tm          = new TendencyModel();
                tm.Big      = at.BigNum(i, EnumStyle);          //大大
                tm.BigSmall = at.BigSmallNum(i, EnumStyle);     //大小
                tm.SmallBig = at.SmallBigNum(i, EnumStyle);     //小大
                tm.Small    = at.SmallNum(i, EnumStyle);        //小小

                tm.Odd     = at.OddPairNum(i, 1, 1, EnumStyle); //奇奇
                tm.OddPair = at.OddPairNum(i, 1, 0, EnumStyle); //奇偶
                tm.PairOdd = at.OddPairNum(i, 0, 1, EnumStyle); //偶奇
                tm.Pair    = at.OddPairNum(i, 0, 0, EnumStyle); //偶偶
                tm.Dbl     = at.DblNum(i, EnumStyle);           //重数
                Tendency.AddTendency(tm);                       //添加趋势记录
            }

            for (int i = 0, j = Lottery.Lt_Lotterys.Count - 1; i < Lottery.Lt_Lotterys.Count; i++)
            {
                Lottery.Lt_Lotterys[i].sno = j;
                j--;
            }
        }
コード例 #4
0
ファイル: XscpSqlliteBLL.cs プロジェクト: xh330786390/XSCP
        /// <summary>
        /// 添加二星趋势
        /// </summary>
        /// <param name="type"></param>
        /// <param name="dt"></param>
        /// <param name="ltData"></param>
        public static void SaveTendency2(Tendency2Enum type, List <LotteryModel> ltData)
        {
            int index1, index2 = 0;

            if (type == Tendency2Enum.Before)
            {
                index1 = 1;
                index2 = 2;
            }
            else
            {
                index1 = 4;
                index2 = 5;
            }

            LotteryModel minData = ltData[ltData.Count - 1];

            //上一期趋势
            Tendency2Model preTendency2 = null;

            //本次上一次开奖趋势,除非最后一期
            int prePperiod = int.Parse(minData.Sno) - 1;

            if (prePperiod > 0)
            {
                preTendency2 = SQLiteHelper.QueryTendency2(type, minData.Ymd, prePperiod.ToString().PadLeft(4, '0'));
            }

            AnalyzeTendency       At          = new AnalyzeTendency();
            List <Tendency2Model> ltTendency2 = new List <Tendency2Model>();

            for (int i = ltData.Count - 1; i >= 0; i--)
            {
                LotteryModel   lm = ltData[i];
                Tendency2Model tm = new Tendency2Model();
                tm.Ymd     = lm.Ymd;
                tm.Lottery = lm.Lottery;
                tm.Sno     = lm.Sno;

                tm.Big      = At.BigNum(lm, preTendency2, index1, index2);          //大大
                tm.Small    = At.SmallNum(lm, preTendency2, index1, index2);        //小小
                tm.BigSmall = At.BigSmallNum(lm, preTendency2, index1, index2);     //大小
                tm.SmallBig = At.SmallBigNum(lm, preTendency2, index1, index2);     //小大

                tm.Odd     = At.OddPairNum(lm, preTendency2, index1, index2, 1, 1); //奇奇
                tm.Pair    = At.OddPairNum(lm, preTendency2, index1, index2, 0, 0); //偶偶
                tm.OddPair = At.OddPairNum(lm, preTendency2, index1, index2, 1, 0); //奇偶
                tm.PairOdd = At.OddPairNum(lm, preTendency2, index1, index2, 0, 1); //偶奇

                tm.Dbl   = At.DblNum(lm, preTendency2, index1, index2);             //重数
                tm.Dtime = lm.Dtime;

                ltTendency2.Add(tm);

                prePperiod = int.Parse(lm.Sno);
                if (prePperiod == 1380)
                {
                    preTendency2 = null;
                }
                else
                {
                    preTendency2 = tm;
                }
            }


            SQLiteHelper.SaveTendency2(type, ltTendency2);
        }
コード例 #5
0
ファイル: XscpMysqlBLL.cs プロジェクト: xh330786390/XSCP
        /// <summary>
        /// 添加二星趋势
        /// </summary>
        /// <param name="type"></param>
        /// <param name="dt"></param>
        /// <param name="ltData"></param>
        public static void SaveTendency2(Tendency2Enum type, List <LotteryModel> ltData)
        {
            int index1, index2 = 0;

            if (type == Tendency2Enum.Before)
            {
                index1 = 1;
                index2 = 2;
            }
            else
            {
                index1 = 4;
                index2 = 5;
            }

            LotteryModel minData = ltData[ltData.Count - 1];

            //上一期趋势
            Tendency2Model preTendency2 = null;

            //本次上一次开奖趋势,除非最后一期
            int prePperiod = int.Parse(minData.Sno) - 1;

            if (prePperiod > 0)
            {
                preTendency2 = MysqlHelper.QueryTendency2(type, minData.Ymd, prePperiod.ToString().PadLeft(4, '0'));
            }

            AnalyzeTendency       At          = new AnalyzeTendency();
            List <Tendency2Model> ltTendency2 = new List <Tendency2Model>();

            for (int i = ltData.Count - 1; i >= 0; i--)
            {
                LotteryModel   lm = ltData[i];
                Tendency2Model tm = new Tendency2Model();
                tm.Ymd     = lm.Ymd;
                tm.Lottery = lm.Lottery;
                tm.Sno     = lm.Sno;

                //大、小
                tm.Big      = At.BigNum(lm, preTendency2, index1, index2);      //大大
                tm.Small    = At.SmallNum(lm, preTendency2, index1, index2);    //小小
                tm.BigSmall = At.BigSmallNum(lm, preTendency2, index1, index2); //大小
                tm.SmallBig = At.SmallBigNum(lm, preTendency2, index1, index2); //小大

                //奇偶
                tm.Odd     = At.OddPairNum(lm, preTendency2, index1, index2, 1, 1); //奇奇
                tm.Pair    = At.OddPairNum(lm, preTendency2, index1, index2, 0, 0); //偶偶
                tm.OddPair = At.OddPairNum(lm, preTendency2, index1, index2, 1, 0); //奇偶
                tm.PairOdd = At.OddPairNum(lm, preTendency2, index1, index2, 0, 1); //偶奇

                //质、合
                tm.PrimePrime         = At.PrimePrime(lm, preTendency2, index1, index2);         //质质数
                tm.PrimeComposite     = At.PrimeComposite(lm, preTendency2, index1, index2);     //质合数
                tm.CompositePrime     = At.CompositePrime(lm, preTendency2, index1, index2);     //合质数
                tm.CompositeComposite = At.CompositeComposite(lm, preTendency2, index1, index2); //合合数

                //0、1、2路
                tm.No_00 = At.RoadNum012(lm, preTendency2, index1, index2, 0, 0); //00路
                tm.No_01 = At.RoadNum012(lm, preTendency2, index1, index2, 0, 1); //01路
                tm.No_02 = At.RoadNum012(lm, preTendency2, index1, index2, 0, 2); //02路
                tm.No_10 = At.RoadNum012(lm, preTendency2, index1, index2, 1, 0); //10路
                tm.No_11 = At.RoadNum012(lm, preTendency2, index1, index2, 1, 1); //11路
                tm.No_12 = At.RoadNum012(lm, preTendency2, index1, index2, 1, 2); //12路
                tm.No_20 = At.RoadNum012(lm, preTendency2, index1, index2, 2, 0); //20路
                tm.No_21 = At.RoadNum012(lm, preTendency2, index1, index2, 2, 1); //21路
                tm.No_22 = At.RoadNum012(lm, preTendency2, index1, index2, 2, 2); //22路

                //大、中、小
                tm.Big1Big1     = At.Big1Big1(lm, preTendency2, index1, index2);     //大大
                tm.Big1Mid1     = At.Big1Mid1(lm, preTendency2, index1, index2);     //大中
                tm.Big1Small1   = At.Big1Small1(lm, preTendency2, index1, index2);   //大小
                tm.Mid1Big1     = At.Mid1Big1(lm, preTendency2, index1, index2);     //中大
                tm.Mid1Mid1     = At.Mid1Mid1(lm, preTendency2, index1, index2);     //中中
                tm.Mid1Small1   = At.Mid1Small1(lm, preTendency2, index1, index2);   //中小
                tm.Small1Big1   = At.Small1Big1(lm, preTendency2, index1, index2);   //小大
                tm.Small1Mid1   = At.Small1Mid1(lm, preTendency2, index1, index2);   //小中
                tm.Small1Small1 = At.Small1Small1(lm, preTendency2, index1, index2); //小小

                tm.Dbl   = At.DblNum(lm, preTendency2, index1, index2);              //重数
                tm.Dtime = lm.Dtime;

                ltTendency2.Add(tm);

                prePperiod = int.Parse(lm.Sno);
                if (prePperiod == 1380)
                {
                    preTendency2 = null;
                }
                else
                {
                    preTendency2 = tm;
                }
            }

            MysqlHelper.SaveTendency2(type, ltTendency2);
        }