private void analyze3Tendency(Lottery lottery, Tendency <Tendency3Model> tendency, int index1, int index2, int index3) { tendency.ClearTendencys();//清空记录 Tendency3Model tm; for (int i = lottery.Lt_Lotterys.Count - 1; i >= 0; i--) { tm = new Tendency3Model(); tm.UnitThree = At.UnitThree(lottery.Lt_Lotterys, i, index1, index2, index3); tm.Sno = (lottery.Lt_Lotterys[i].Sno.ToString() + "期").PadLeft(5, '0'); tm.Dtime = lottery.Lt_Lotterys[i].Dtime; tendency.AddTendency(tm);//添加趋势记录 } }
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.SexBeforeStart = At.UnitSex(lottery.Lt_Lotterys, i, 1, 2, 3); tm.ThreeAfterStart = At.UnitThree(lottery.Lt_Lotterys, i, 3, 4, 5); tm.SexAfterStart = At.UnitSex(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);//添加趋势记录 } }