private void initLabel() { if (Lottery.Lt_Lotterys.Count > 0) { //本次开奖号码 LotteryModel lm = Lottery.Lt_Lotterys[0]; this.lbl1.Text = lm.num1.ToString(); this.lbl2.Text = lm.num2.ToString(); this.lbl3.Text = lm.num3.ToString(); this.lbl4.Text = lm.num4.ToString(); this.lbl5.Text = lm.num5.ToString(); } if (Tendency.Lt_Tendencys.Count > 0) { //本次未开奖走势 TendencyModel tm = Tendency.CurrTendency; this.lblBig.Text = tm.Big.ToString(); this.lblBigSmall.Text = tm.BigSmall.ToString(); this.lblSmallBig.Text = tm.SmallBig.ToString(); this.lblSmall.Text = tm.Small.ToString(); this.lblOdd.Text = tm.Odd.ToString(); this.lblOddPair.Text = tm.OddPair.ToString(); this.lblPairOdd.Text = tm.PairOdd.ToString(); this.lblPair.Text = tm.Pair.ToString(); this.lblDbl.Text = tm.Dbl.ToString(); } if (DwdTendency.Lt_Dwd.Count > 0) { DwdTendencyModel dtm1 = null; DwdTendencyModel dtm2 = null; //本次定位胆未开奖走势 if (EnumStyle == Model.EnumStyle.后二) { dtm1 = DwdTendency.GetCurrentDwdTendency(4); dtm2 = DwdTendency.GetCurrentDwdTendency(5); } //本次定位胆未开奖走势 else if (EnumStyle == Model.EnumStyle.前二) { dtm1 = DwdTendency.GetCurrentDwdTendency(1); dtm2 = DwdTendency.GetCurrentDwdTendency(2); } this.lblDwdBig.Text = dtm1.Big.ToString() + dtm2.Big.ToString(); this.lblDwdSmall.Text = dtm1.Small.ToString() + dtm2.Small.ToString(); this.lblDwdBigSmall.Text = dtm1.Big.ToString() + dtm2.Small.ToString(); this.lblDwdSmallBig.Text = dtm1.Small.ToString() + dtm2.Big.ToString(); this.lblDwdOdd.Text = dtm1.Odd.ToString() + dtm2.Odd.ToString(); this.lblDwdPair.Text = dtm1.Pair.ToString() + dtm2.Pair.ToString(); this.lblDwdOddPair.Text = dtm1.Odd.ToString() + dtm2.Pair.ToString(); this.lblDwdPairOdd.Text = dtm1.Pair.ToString() + dtm2.Odd.ToString(); } }
/// <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);//添加趋势记录 } }
/// <summary> /// 012路 /// </summary> /// <param name="lottery"></param> /// <param name="preTendency1"></param> /// <param name="digit">位数:1 万 2 千 3 百 4 十 5 个</param> /// <returns></returns> public int RoadNum012(LotteryModel lottery, TendencyModel preTendency1, int digit, int num012) { Value value = GetValue(lottery, digit); if (value.v1 % 3 == num012) { return(0); } int count = 1; if (preTendency1 != null) { if (num012 == 0) { count = preTendency1.No_0 + 1; } else if (num012 == 1) { count = preTendency1.No_1 + 1; } else if (num012 == 2) { count = preTendency1.No_2 + 1; } } return(count); }
/// <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--; } }
/// <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);//添加趋势记录 } }
private void initDgv1(List <TendencyModel> lt, TendencyModel maxTendency) { TendencyModel tm; DgvController.AddRows(this.dgv1, lt.Count); for (int i = 0; i < lt.Count; i++) { tm = lt[i]; this.dgv1[0, i].Value = i + 1; //局数 this.dgv1[1, i].Value = tm.Dtime; //开奖日期 this.dgv1[2, i].Value = tm.Big; //大 this.dgv1[3, i].Value = tm.Small; //小 this.dgv1[4, i].Value = tm.BigSmall; //大小 this.dgv1[5, i].Value = tm.SmallBig; //小大 this.dgv1[6, i].Value = ""; this.dgv1[7, i].Value = tm.Odd; //奇 this.dgv1[8, i].Value = tm.Pair; //偶 this.dgv1[9, i].Value = tm.OddPair; //奇偶 this.dgv1[10, i].Value = tm.PairOdd; //偶奇 this.dgv1[11, i].Value = tm.SNO; // } refreshColor(); refreshMaxTendency(maxTendency); }
/// <summary> /// 设置dgv值 /// </summary> /// <param name="dgv"></param> /// <param name="tm"></param> /// <param name="row"></param> public static void SetDgvValue(DataGridView dgv, TendencyModel tm, int row, List <WinLotteryModel> lt) { dgv[1, row].Value = tm.Big; //大 dgv[2, row].Value = tm.Small; //小 dgv[3, row].Value = tm.BigSmall; //大小 dgv[4, row].Value = tm.SmallBig; //小大 dgv[5, row].Value = ""; dgv[6, row].Value = tm.Odd; //奇 dgv[7, row].Value = tm.Pair; //偶 dgv[8, row].Value = tm.OddPair; //奇偶 dgv[9, row].Value = tm.PairOdd; //偶奇 dgv[10, row].Value = tm.Dbl; //重 dgv[11, row].Value = "趋势"; dgv[12, row].Value = "统计"; if (lt != null) { int index = 0; for (int i = 0; i < lt.Count; i++) { string[] ar = getIndex(lt[i]).Split(','); index = Convert.ToInt32(ar[0]); dgv[index, row].ToolTipText = ar[1] + ": " + lt[i].KjLong.ToString(); } } }
/// <summary> /// 新增一星走势数据 /// </summary> /// <param name="type"></param> /// <param name="tendencys"></param> public static void SaveTendency1(Tendency1Enum type, List <TendencyModel> tendencys) { string tableName = getTendency1Table(type); using (SQLiteConnection conn = CreateConnection()) { conn.Open(); SQLiteTransaction trans = conn.BeginTransaction(); string sqlCount = string.Format("SELECT count(1) FROM {0} where Ymd = @Ymd and Sno=@Sno", tableName); try { string sql = null; for (int i = 0; i < tendencys.Count; i++) { TendencyModel lm = tendencys[i]; int count = conn.Query <int>(sqlCount, lm).FirstOrDefault(); if (count == 0) { ///新增 sql = string.Format("insert into {0}(Ymd ," + @"Sno ," + @"Lottery ," + @"Big ," + @"Small ," + @"Odd ," + @"Pair ," + @"Dtime )" + @" VALUES (" + @"@Ymd ," + @"@Sno ," + @"@Lottery ," + @"@Big ," + @"@Small ," + @"@Odd ," + @"@Pair ," + @"@Dtime " + @")", tableName); } else { ///修改 sql = string.Format("Update {0} set Big =@Big ," + "Small =@Small ," + "Odd =@Odd ," + "Pair =@Pair " + "where Ymd = @Ymd and Sno=@Sno ", tableName); } conn.Execute(sql, lm, trans); } trans.Commit(); } catch (Exception) { trans.Rollback(); } } }
/// <summary> /// 取某一位的,奇、偶、大、小、012路 最大走势 /// </summary> /// <param name="type"></param> /// <param name="date"></param> /// <param name="num"></param> /// <returns></returns> public JsonResult PostMaxRoadTrendecy(int type, string date) { date = date.Replace("-", ""); Tendency1Enum tendency1Enum = (Tendency1Enum)type; TendencyModel tm = XscpMysqlBLL.QueryMaxTendency1(tendency1Enum, date); tm.Sno = "最大"; return(Json(tm, JsonRequestBehavior.AllowGet)); }
/// <summary> /// 设置 /// </summary> public static void SetCTendencysValue(TendencyModel tm) { Lt_CurrentBS[0].Value = tm.Big; Lt_CurrentBS[1].Value = tm.BigSmall; Lt_CurrentBS[2].Value = tm.SmallBig; Lt_CurrentBS[3].Value = tm.Small; Lt_CurrentOP[0].Value = tm.Odd; Lt_CurrentOP[1].Value = tm.OddPair; Lt_CurrentOP[2].Value = tm.PairOdd; Lt_CurrentOP[3].Value = tm.Pair; }
/// <summary> /// 新增一星走势数据 /// </summary> /// <param name="type"></param> /// <param name="tendencys"></param> public static void SaveTendency1(Tendency1Enum type, List <LotteryModel> ltData) { int index = (int)type; LotteryModel minData = ltData[ltData.Count - 1]; //上一期趋势 TendencyModel preTendency1 = null; //本次上一次开奖趋势,除非最后一期 int prePperiod = int.Parse(minData.Sno) - 1; if (prePperiod > 0) { preTendency1 = SQLiteHelper.QueryTendency1(type, minData.Ymd, prePperiod.ToString().PadLeft(4, '0')); } AnalyzeTendency At = new AnalyzeTendency(); List <TendencyModel> ltTendency = new List <TendencyModel>(); for (int i = ltData.Count - 1; i >= 0; i--) { LotteryModel lm = ltData[i]; TendencyModel tm = new TendencyModel(); tm.Ymd = lm.Ymd; tm.Lottery = lm.Lottery; tm.Sno = lm.Sno; tm.Big = At.BigNum(lm, preTendency1, index); //大大 tm.Small = At.SmallNum(lm, preTendency1, index); //小小 tm.Odd = At.OddPairNum(lm, preTendency1, index, 1); //奇奇 tm.Pair = At.OddPairNum(lm, preTendency1, index, 0); //偶偶 tm.Dtime = lm.Dtime; ltTendency.Add(tm); prePperiod = int.Parse(lm.Sno); if (prePperiod == 1380) { preTendency1 = null; } else { preTendency1 = tm; } } SQLiteHelper.SaveTendency1(type, ltTendency); }
/// <summary> /// 获取属性值 /// </summary> /// <param name="tm"></param> /// <param name="fieldName"></param> /// <returns></returns> private bool isWinLoterry(TendencyModel tm, string propertyName1, string propertyName2) { int value1 = (int)Reflection.GetPropertyValue(type, tm, propertyName1); int value2 = (int)Reflection.GetPropertyValue(type, tm, propertyName2); if (value1 == 0 || value2 == 0) { return(true); } else { return(false); } }
/// <summary> /// 获取最大走势值 /// </summary> /// <returns></returns> public static TendencyModel GetMaxTendency(List <TendencyModel> Lt_Tendencys) { TendencyModel tm = new TendencyModel(); tm.Big = Lt_Tendencys.Max(l => l.Big); //大 tm.Small = Lt_Tendencys.Max(l => l.Small); //小 tm.BigSmall = Lt_Tendencys.Max(l => l.BigSmall); //大小 tm.SmallBig = Lt_Tendencys.Max(l => l.SmallBig); //小大 tm.Odd = Lt_Tendencys.Max(l => l.Odd); //奇 tm.Pair = Lt_Tendencys.Max(l => l.Pair); //偶 tm.OddPair = Lt_Tendencys.Max(l => l.OddPair); //奇偶 tm.PairOdd = Lt_Tendencys.Max(l => l.PairOdd); //偶奇 tm.Dbl = Lt_Tendencys.Max(l => l.Dbl); //重 return(tm); }
/// <summary> /// 设置dgv值 /// </summary> /// <param name="dgv"></param> /// <param name="tm"></param> /// <param name="row"></param> public static void SetDgvValue(DataGridView dgv, TendencyModel tm, int row) { dgv[1, row].Value = tm.Big; //大 dgv[2, row].Value = tm.Small; //小 dgv[3, row].Value = tm.BigSmall; //大小 dgv[4, row].Value = tm.SmallBig; //小大 dgv[5, row].Value = ""; dgv[6, row].Value = tm.Odd; //奇 dgv[7, row].Value = tm.Pair; //偶 dgv[8, row].Value = tm.OddPair; //奇偶 dgv[9, row].Value = tm.PairOdd; //偶奇 dgv[10, row].Value = tm.Dbl; //重 dgv[11, row].Value = "趋势"; dgv[12, row].Value = "-"; }
/// <summary> /// 小 /// </summary> /// <param name="lottery"></param> /// <param name="preTendency1"></param> /// <param name="digit">位数:1 万 2 千 3 百 4 十 5 个</param> /// <returns></returns> public int SmallNum(LotteryModel lottery, TendencyModel preTendency1, int digit) { Value value = GetValue(lottery, digit); if (value.v1 < 5) { return(0); } int count = 1; if (preTendency1 != null) { count = preTendency1.Small + 1; } return(count); }
/// <summary> /// 中 /// </summary> /// <param name="lottery"></param> /// <param name="preTendency1"></param> /// <param name="digit">位数:1 万 2 千 3 百 4 十 5 个</param> /// <returns></returns> public int Mid_1(LotteryModel lottery, TendencyModel preTendency1, int digit) { Value value = GetValue(lottery, digit); if (value.v1 > 2 && value.v1 < 7) { return(0); } int count = 1; if (preTendency1 != null) { count = preTendency1.Mid_1 + 1; } return(count); }
/// <summary> /// 合数 /// </summary> /// <param name="lottery"></param> /// <param name="preTendency1"></param> /// <param name="digit">位数:1 万 2 千 3 百 4 十 5 个</param> /// <returns></returns> public int Composite(LotteryModel lottery, TendencyModel preTendency1, int digit) { Value value = GetValue(lottery, digit); if (Lt_Composite.Contains(value.v1)) { return(0); } int count = 1; if (preTendency1 != null) { count = preTendency1.Composite + 1; } return(count); }
public static void SetTendency1Value(DataGridViewRow dgvRow, TendencyModel tm1, TendencyModel tm2) { if (tm1 == null || tm2 == null) { return; } dgvRow.Cells["Sno"].Value = tm1.Sno; dgvRow.Cells["Big"].Value = tm1.Big + "|" + tm2.Big; dgvRow.Cells["Small"].Value = tm1.Small + "|" + tm2.Small; dgvRow.Cells["BigSmall"].Value = tm1.Big + "|" + tm2.Small; dgvRow.Cells["SmallBig"].Value = tm1.Small + "|" + tm2.Big; dgvRow.Cells["Odd"].Value = tm1.Odd + "|" + tm2.Odd; dgvRow.Cells["Pair"].Value = tm1.Pair + "|" + tm2.Pair; dgvRow.Cells["OddPair"].Value = tm1.Odd + "|" + tm2.Pair; dgvRow.Cells["PairOdd"].Value = tm1.Pair + "|" + tm2.Odd; dgvRow.Cells["Dbl"].Value = "-"; dgvRow.Cells["Tendency2"].Value = "走势"; dgvRow.Cells["Statistics"].Value = "-"; }
public static TendencyDwdModel GetTendencyDwdValue(TendencyModel tm1, TendencyModel tm2) { if (tm1 == null || tm2 == null) { return(null); } TendencyDwdModel tmResult = new TendencyDwdModel(); tmResult.Lottery = tm1.Lottery; tmResult.Big = tm1.Big + "|" + tm2.Big; tmResult.Small = tm1.Small + "|" + tm2.Small; tmResult.BigSmall = tm1.Big + "|" + tm2.Small; tmResult.SmallBig = tm1.Small + "|" + tm2.Big; tmResult.Odd = tm1.Odd + "|" + tm2.Odd; tmResult.Pair = tm1.Pair + "|" + tm2.Pair; tmResult.OddPair = tm1.Odd + "|" + tm2.Pair; tmResult.PairOdd = tm1.Pair + "|" + tm2.Odd; tmResult.Dbl = "-"; tmResult.Dtime = tm1.Dtime; return(tmResult); }
private void btnFind_Click(object sender, EventArgs e) { this.Cursor = Cursors.WaitCursor; TimeSpan d = this.dtpEnd.Value - this.dtpStart.Value; days = d.Days + 1; string fileName = null; Lottery lottery = new LotteryFF(); Tendency tendency = new Tendency(); TendencyModel maxTendency = null; maxTendencys.Clear(); for (int i = 0; i < days; i++) { fileName = Param.FileBase + @"分分彩\" + "ffcp" + this.dtpStart.Value.AddDays(i).ToString("yyyyMMdd") + ".txt"; if (!File.Exists(fileName)) { continue; } coreMethod.ReadFile(this.dtpStart.Value.AddDays(i), lottery, fileName);//读取文件 coreMethod.AnalyzeTendency(lottery, tendency, num1, num2); maxTendency = tendency.GetMaxTendency(); maxTendency.Dtime = this.dtpStart.Value.AddDays(i).ToString("yyyyMMdd"); maxTendency.SNO = this.dtpStart.Value.AddDays(i).DayOfWeek.ToString(); maxTendencys.Add(maxTendency); } maxTendency = Tendency.GetMaxTendency(maxTendencys); if (maxTendencys.Count > 0) { initDgv1(maxTendencys, maxTendency); } this.Cursor = null; }
/// <summary> /// 奇偶 /// </summary> /// <param name="lottery"></param> /// <param name="preTendency1"></param> /// <param name="digit">位数:1 万 2 千 3 百 4 十 5 个</param> /// <param name="oddPair"></param> /// <returns></returns> public int OddPairNum(LotteryModel lottery, TendencyModel preTendency1, int digit, int oddPair) { Value value = GetValue(lottery, digit); if (value.v1 % 2 == oddPair) { return(0); } int count = 1; if (preTendency1 != null) { if (oddPair == 1) { count = preTendency1.Odd + 1; } else if (oddPair == 0) { count = preTendency1.Pair + 1; } } return(count); }
/// <summary> /// 给统计表添加数据 /// </summary> /// <param name="curFm"></param> /// <param name="nextFm"></param> private static void addStatisticsValue(TendencyModel curfm, TendencyModel nextfm) { WinLotteryModel sm = new WinLotteryModel(); if (nextfm.Dbl == 0) { sm.BigSmallValue = curfm.Dbl; sm.UnitName = "重重"; } else if (nextfm.Big == 0) { sm.BigSmallValue = curfm.Big; sm.UnitName = "大大"; } else if (nextfm.BigSmall == 0) { sm.BigSmallValue = curfm.BigSmall; sm.UnitName = "大小"; } else if (nextfm.SmallBig == 0) { sm.BigSmallValue = curfm.SmallBig; sm.UnitName = "小大"; } else if (nextfm.Small == 0) { sm.BigSmallValue = curfm.Small; sm.UnitName = "小小"; } if (nextfm.Dbl == 0) { sm.BigSmallValue = curfm.Dbl; sm.UnitName += "重重"; } else if (nextfm.Odd == 0) { sm.OddPairValue = curfm.Odd; sm.UnitName += "奇奇"; } else if (nextfm.OddPair == 0) { sm.OddPairValue = curfm.OddPair; sm.UnitName += "奇偶"; } else if (nextfm.PairOdd == 0) { sm.OddPairValue = curfm.PairOdd; sm.UnitName += "偶奇"; } else if (nextfm.Pair == 0) { sm.OddPairValue = curfm.Pair; sm.UnitName += "偶偶"; } //var vs = Lt_WinLotterys.Where(lt => lt.UnitName == sm.UnitName && lt.BigSmallValue == sm.BigSmallValue && lt.OddPairValue == sm.OddPairValue).ToList(); Lt_WinLotterys.Add(sm); //if (vs.Count == 0) //{ // sm.Sum = 1; // Lt_WinLotterys.Add(sm); //} //else //{ // vs.ForEach(l => l.Sum += 1); //} }
private void refreshMaxTendency(TendencyModel tm) { int maxValue = 0; string strValue = ""; for (int i = 0; i < this.dgv1.Rows.Count; i++) { for (int j = 2; j < this.dgv1.Columns.Count - 1; j++) { strValue = this.dgv1[j, i].Value.ToString(); if (!string.IsNullOrEmpty(strValue)) { maxValue = Convert.ToInt32(strValue); switch (j) { case 2: if (maxValue == tm.Big) { DgvController.SetDgvBackColorStyle(this.dgv1, i, j, Color.Yellow, 12); } break; case 3: if (maxValue == tm.Small) { DgvController.SetDgvBackColorStyle(this.dgv1, i, j, Color.Yellow, 12); } break; case 4: if (maxValue == tm.BigSmall) { DgvController.SetDgvBackColorStyle(this.dgv1, i, j, Color.Yellow, 12); } break; case 5: if (maxValue == tm.SmallBig) { DgvController.SetDgvBackColorStyle(this.dgv1, i, j, Color.Yellow, 12); } break; case 7: if (maxValue == tm.Odd) { DgvController.SetDgvBackColorStyle(this.dgv1, i, j, Color.Yellow, 12); } break; case 8: if (maxValue == tm.Pair) { DgvController.SetDgvBackColorStyle(this.dgv1, i, j, Color.Yellow, 12); } break; case 9: if (maxValue == tm.OddPair) { DgvController.SetDgvBackColorStyle(this.dgv1, i, j, Color.Yellow, 12); } break; case 10: if (maxValue == tm.PairOdd) { DgvController.SetDgvBackColorStyle(this.dgv1, i, j, Color.Yellow, 12); } break; default: break; } } } } }
/// <summary> /// 新增趋势记录 /// </summary> /// <param name="lottery"></param> public static void AddTendency(TendencyModel tm) { Lt_Tendencys.Add(tm); }
/// <summary> /// 给统计表添加数据 /// </summary> /// <param name="curFm"></param> /// <param name="nextFm"></param> private List <WinLotteryModel> addStatisticsValue(TendencyModel curfm, TendencyModel nextfm) { List <WinLotteryModel> lt = new List <WinLotteryModel>(); WinLotteryModel wm = new WinLotteryModel(); if (curfm.Dbl == 0) { wm.KjLong = nextfm.Dbl; wm.UnitName = "Dbl"; } else if (curfm.Big == 0) { wm.KjLong = nextfm.Big; wm.UnitName = "Big"; } else if (curfm.BigSmall == 0) { wm.KjLong = nextfm.BigSmall; wm.UnitName = "BigSmall"; } else if (curfm.SmallBig == 0) { wm.KjLong = nextfm.SmallBig; wm.UnitName = "SmallBig"; } else if (curfm.Small == 0) { wm.KjLong = nextfm.Small; wm.UnitName = "Small"; } lt.Add(wm); wm = new WinLotteryModel(); if (curfm.Dbl == 0) { wm.KjLong = nextfm.Dbl; wm.UnitName = "Dbl"; } else if (curfm.Odd == 0) { wm.KjLong = nextfm.Odd; wm.UnitName = "Odd"; } else if (curfm.OddPair == 0) { wm.KjLong = nextfm.OddPair; wm.UnitName = "OddPair"; } else if (curfm.PairOdd == 0) { wm.KjLong = nextfm.PairOdd; wm.UnitName = "PairOdd"; } else if (curfm.Pair == 0) { wm.KjLong = nextfm.Pair; wm.UnitName = "Pair"; } lt.Add(wm); return(lt); }
/// <summary> /// 新增趋势记录 /// </summary> /// <param name="lottery"></param> public void AddTendency(TendencyModel tm) { this.Lt_Tendencys.Add(tm); }