Esempio n. 1
0
        /// <summary>
        /// 获取前二、后二最大走势值
        /// </summary>
        /// <returns></returns>
        public static TendencyAllModel GetMaxTendency(List <TendencyAllModel> Lt_Tendencys)
        {
            TendencyAllModel tm = new TendencyAllModel();

            tm.ThreeBeforeStart = Lt_Tendencys.Max(l => l.ThreeBeforeStart); //前组三
            tm.SexBeforeStart   = Lt_Tendencys.Max(l => l.SexBeforeStart);   //前组六

            tm.ThreeAfterStart = Lt_Tendencys.Max(l => l.ThreeAfterStart);   //后组三
            tm.SexAfterStart   = Lt_Tendencys.Max(l => l.SexAfterStart);     //后组六
            tm.FiveStart       = Lt_Tendencys.Max(l => l.FiveStart);         //五星
            return(tm);
        }
Esempio n. 2
0
        private void analyzeAllTendency(Lottery lottery, Tendency <TendencyAllModel> tendency)
        {
            tendency.ClearTendencys();//清空记录
            TendencyAllModel tm;

            for (int i = lottery.Lt_Lotterys.Count - 1; i >= 0; i--)
            {
                tm = new TendencyAllModel();
                tm.ThreeBeforeStart = At.UnitThree(lottery.Lt_Lotterys, i, 1, 2, 3);
                tm.ThreeAfterStart  = At.UnitThree(lottery.Lt_Lotterys, i, 3, 4, 5);
                tm.FiveStart        = At.FiveStart(lottery.Lt_Lotterys, i);
                tm.Sno   = (lottery.Lt_Lotterys[i].Sno.ToString() + "期").PadLeft(5, '0');
                tm.Dtime = lottery.Lt_Lotterys[i].Dtime;
                tendency.AddTendency(tm);//添加趋势记录
            }
        }
Esempio n. 3
0
        public static void SetDgvValue(DataGridView dgv, TendencyAllModel tm, int row)
        {
            dgv[1, row].Value = tm.ThreeBeforeStart;
            dgv[2, row].Value = tm.SexBeforeStart;

            dgv[4, row].Value = tm.ThreeAfterStart;
            dgv[5, row].Value = tm.SexAfterStart;

            dgv[7, row].Value = tm.FiveStart;

            if (row == 0)
            {
                dgv[8, row].Value = "-";
                dgv[9, row].Value = "-";
            }
            else
            {
                dgv[8, row].Value = "趋势";
                dgv[9, row].Value = "统计";
            }
        }