Ejemplo n.º 1
0
        /// <summary>
        /// 前二、后二趋势
        /// </summary>
        private void initDgvFF()
        {
            if (befor2FFTendency.Lt_Tendencys.Count <= 0)
            {
                return;
            }

            DgvController.AddRows(this.dgvFF, 6);//添加记录
            DgvController.SetDgvValue(this.dgvFF, DgvController.Lt_Type, 0);

            DgvController.SetDgvValue(this.dgvFF, XsMath.GetMaxTendency(befor2FFTendency.Lt_Tendencys), 0);                                                                   //前大
            DgvController.SetDgvValue(this.dgvFF, ((Tendency <Tendency1Model>) this.lt_dwds[0]).CurrTendency, ((Tendency <Tendency1Model>) this.lt_dwds[1]).CurrTendency, 1); //前定

            WinLottery wl = new WinLottery();

            DgvController.SetDgvValue(this.dgvFF, befor2FFTendency.CurrTendency, 2, wl.CalculatorWinLottery(this.befor2FFTendency.Lt_Tendencys)); //前二
            DgvController.SetDgvValue(this.dgvFF, after2FFTendency.CurrTendency, 3, wl.CalculatorWinLottery(this.after2FFTendency.Lt_Tendencys)); //后二


            DgvController.SetDgvValue(this.dgvFF, ((Tendency <Tendency1Model>) this.lt_dwds[3]).CurrTendency, ((Tendency <Tendency1Model>) this.lt_dwds[4]).CurrTendency, 4); //后定
            DgvController.SetDgvValue(this.dgvFF, XsMath.GetMaxTendency(after2FFTendency.Lt_Tendencys), 5);                                                                   //后大

            DgvController.RefreshDgvColor(this.dgvFF, 2);
            DgvController.RefreshDgvColor(this.dgvFF, 3);
        }
Ejemplo n.º 2
0
        private void initDgvFF()
        {
            DgvController.AddRows(this.dgvFF, 6);//添加记录
            DgvController.SetDgvValue(this.dgvFF, DgvController.Lt_Type, 0);

            DgvController.SetDgvValue(this.dgvFF, beforFFTendency.GetMaxTendency(), 0);                                         //前大
            DgvController.SetDgvValue(this.dgvFF, this.DwdFFTendency1.CurrDwdTendency, this.DwdFFTendency2.CurrDwdTendency, 1); //前定

            WinLottery wl = new WinLottery();

            DgvController.SetDgvValue(this.dgvFF, beforFFTendency.CurrTendency, 2, wl.CalculatorWinLottery(this.beforFFTendency.Lt_Tendencys)); //前二
            DgvController.SetDgvValue(this.dgvFF, afterFFTendency.CurrTendency, 3, wl.CalculatorWinLottery(this.afterFFTendency.Lt_Tendencys)); //后二

            DgvController.SetDgvValue(this.dgvFF, this.DwdFFTendency4.CurrDwdTendency, this.DwdFFTendency5.CurrDwdTendency, 4);                 //后定
            DgvController.SetDgvValue(this.dgvFF, afterFFTendency.GetMaxTendency(), 5);                                                         //后大

            DgvController.RefreshDgvColor(this.dgvFF, 2);
            DgvController.RefreshDgvColor(this.dgvFF, 3);
        }
Ejemplo n.º 3
0
        private void initDgv3D()
        {
            DgvController.AddRows(this.dgv3D, 6);                                                                               //添加记录数
            DgvController.SetDgvValue(this.dgv3D, DgvController.Lt_Type, 0);                                                    //添加类型

            DgvController.SetDgvValue(this.dgv3D, befor3DTendency.GetMaxTendency(), 0);                                         //前大
            DgvController.SetDgvValue(this.dgv3D, this.Dwd3DTendency1.CurrDwdTendency, this.Dwd3DTendency2.CurrDwdTendency, 1); //前定

            WinLottery wl = new WinLottery();

            DgvController.SetDgvValue(this.dgv3D, befor3DTendency.CurrTendency, 2, wl.CalculatorWinLottery(this.befor3DTendency.Lt_Tendencys)); //前二
            DgvController.SetDgvValue(this.dgv3D, after3DTendency.CurrTendency, 3, wl.CalculatorWinLottery(this.after3DTendency.Lt_Tendencys)); //后二

            DgvController.SetDgvValue(this.dgv3D, this.Dwd3DTendency2.CurrDwdTendency, this.Dwd3DTendency3.CurrDwdTendency, 4);                 //后定
            DgvController.SetDgvValue(this.dgv3D, after3DTendency.GetMaxTendency(), 5);                                                         //后大

            DgvController.RefreshDgvColor(this.dgv3D, 2);
            DgvController.RefreshDgvColor(this.dgv3D, 3);
        }
Ejemplo n.º 4
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataRowView dr     = (DataRowView)this.comboBox1.SelectedItem;
            string      enName = dr.Row.ItemArray[0].ToString();

            if (enName.Contains("All"))
            {
                winLottery.CalculatorWinLottery(Tendency.Lt_Tendencys, lt_Tt);
            }
            else
            {
                winLottery.CalculatorWinLottery(Tendency.Lt_Tendencys, enName, dr.Row.ItemArray[1].ToString());
            }

            if (winLottery.Lt_WinLotterys.Count > 0)
            {
                DgvController.AddRows(this.dgv1, winLottery.Lt_WinLotterys.Count);

                var vs  = winLottery.Lt_WinLotterys.GroupBy(a => new { a.UnitName, a.KjLong }).Select(g => (new { UnitName = g.Key.UnitName, KjLong = g.Key.KjLong, Count = g.Count() })).OrderBy(l => l.UnitName).ThenBy(l => l.KjLong).ToList();
                int sum = vs.Sum(l => l.Count);
                int max = vs.Max(l => l.KjLong);

                var vSum = vs.GroupBy(l => l.UnitName).Select(g => new { UnitName = g.Key, Sum = g.Sum(k => k.Count) }).ToList();
                DgvController.AddRows(this.dgv1, vs.Count + 1);
                for (int i = 0; i < vs.Count; i++)
                {
                    this.dgv1[0, i].Value = i + 1;
                    this.dgv1[1, i].Value = vs[i].UnitName;
                    this.dgv1[2, i].Value = vs[i].KjLong;
                    this.dgv1[3, i].Value = vs[i].Count;
                }

                this.dgv1[0, vs.Count].Value = vs.Count + 1;
                this.dgv1[1, vs.Count].Value = enName != "Dbl" ? "总开奖次数" : "总重复次数";
                this.dgv1[2, vs.Count].Value = max;
                this.dgv1[3, vs.Count].Value = sum;
            }
        }
Ejemplo n.º 5
0
 public void calculatorWinLottery()
 {
     WinLottery.CalculatorWinLottery();
 }