public override string BuildNumber(int Num) { Random random = new Random(); StringBuilder builder = new StringBuilder(); ArrayList al = new ArrayList(); for (int i = 0; i < Num; i++) { al.Clear(); for (int j = 0; j < 7; j++) { int ball = 0; while ((ball == 0) || base.isExistBall(al, ball)) { ball = random.Next(1, 0x25); } al.Add(ball.ToString().PadLeft(2, '0')); } LotteryBase.CompareToAscii comparer = new LotteryBase.CompareToAscii(); al.Sort(comparer); string str = ""; for (int k = 0; k < al.Count; k++) { str = str + al[k].ToString() + " "; } builder.Append(str.Trim() + "\n"); } string str2 = builder.ToString(); return(str2.Substring(0, str2.Length - 1)); }
public override string BuildNumber(int Num) { Random random = new Random(); StringBuilder builder = new StringBuilder(); ArrayList al = new ArrayList(); for (int i = 0; i < Num; i++) { al.Clear(); for (int j = 0; j < 5; j++) { int ball = 0; while ((ball == 0) || base.isExistBall(al, ball)) { ball = random.Next(1, 0x10); } al.Add(ball.ToString().PadLeft(2, '0')); } LotteryBase.CompareToAscii comparer = new LotteryBase.CompareToAscii(); al.Sort(comparer); string str = ""; for (int k = 0; k < al.Count; k++) { str = str + al[k].ToString() + " "; } builder.Append(str.Trim() + "\n"); } string str2 = builder.ToString(); return str2.Substring(0, str2.Length - 1); }
private string[] FilterRepeated(string[] NumberPart1, string[] NumberPart2) { ArrayList al = new ArrayList(); for (int i = 0; i < NumberPart2.Length; i++) { al.Add(NumberPart2[i]); } ArrayList list2 = new ArrayList(); for (int j = 0; j < NumberPart1.Length; j++) { int ball = _Convert.StrToInt(NumberPart1[j], -1); if (!base.isExistBall(al, ball)) { list2.Add(NumberPart1[j]); } } LotteryBase.CompareToAscii comparer = new LotteryBase.CompareToAscii(); list2.Sort(comparer); string[] strArray = new string[list2.Count]; for (int k = 0; k < list2.Count; k++) { strArray[k] = list2[k].ToString().PadLeft(2, '0'); } return(strArray); }
public override string BuildNumber(int Num, int Type) { if (((((Type != 10) && (Type != 9)) && ((Type != 8) && (Type != 7))) && (((Type != 6) && (Type != 5)) && ((Type != 4) && (Type != 3)))) && ((Type != 2) && (Type != 1))) { Type = 10; } Random random = new Random(); StringBuilder builder = new StringBuilder(); ArrayList al = new ArrayList(); for (int i = 0; i < Num; i++) { string str = ""; for (int j = 0; j < Type; j++) { int ball = 0; while ((ball == 0) || base.isExistBall(al, ball)) { ball = random.Next(1, 0x51); } al.Add(ball.ToString().PadLeft(2, '0')); } LotteryBase.CompareToAscii comparer = new LotteryBase.CompareToAscii(); al.Sort(comparer); for (int k = 0; k < al.Count; k++) { str = str + al[k].ToString() + " "; } builder.Append(str.Trim() + "\n"); } string str2 = builder.ToString(); return(str2.Substring(0, str2.Length - 1)); }
private string[] FilterRepeated(string[] NumberPart) { ArrayList al = new ArrayList(); for (int i = 0; i < NumberPart.Length; i++) { int ball = _Convert.StrToInt(NumberPart[i], -1); if (((ball >= 1) && (ball <= 0x24)) && !base.isExistBall(al, ball)) { al.Add(NumberPart[i]); } } LotteryBase.CompareToAscii comparer = new LotteryBase.CompareToAscii(); al.Sort(comparer); string[] strArray = new string[al.Count]; for (int j = 0; j < al.Count; j++) { strArray[j] = al[j].ToString().PadLeft(2, '0'); } return(strArray); }
private string[] FilterRepeated(string[] NumberPart) { ArrayList al = new ArrayList(); for (int i = 0; i < NumberPart.Length; i++) { int ball = _Convert.StrToInt(NumberPart[i], -1); if (((ball >= 1) && (ball <= 0x23)) && !base.isExistBall(al, ball)) { al.Add(NumberPart[i]); } } LotteryBase.CompareToAscii comparer = new LotteryBase.CompareToAscii(); al.Sort(comparer); string[] strArray = new string[al.Count]; for (int j = 0; j < al.Count; j++) { strArray[j] = al[j].ToString().PadLeft(2, '0'); } return strArray; }
private string[] FilterRepeated(string[] NumberPart1, string[] NumberPart2) { ArrayList al = new ArrayList(); for (int i = 0; i < NumberPart2.Length; i++) { al.Add(NumberPart2[i]); } ArrayList list2 = new ArrayList(); for (int j = 0; j < NumberPart1.Length; j++) { int ball = _Convert.StrToInt(NumberPart1[j], -1); if (!base.isExistBall(al, ball)) { list2.Add(NumberPart1[j]); } } LotteryBase.CompareToAscii comparer = new LotteryBase.CompareToAscii(); list2.Sort(comparer); string[] strArray = new string[list2.Count]; for (int k = 0; k < list2.Count; k++) { strArray[k] = list2[k].ToString().PadLeft(2, '0'); } return strArray; }
public override string BuildNumber(int Red, int Blue, int Num) { Random random = new Random(); StringBuilder builder = new StringBuilder(); ArrayList al = new ArrayList(); ArrayList list2 = new ArrayList(); for (int i = 0; i < Num; i++) { al.Clear(); list2.Clear(); for (int j = 0; j < Red; j++) { int ball = 0; while ((ball == 0) || base.isExistBall(al, ball)) { ball = random.Next(1, 0x22); } al.Add(ball.ToString().PadLeft(2, '0')); } for (int k = 0; k < Blue; k++) { int num5 = 0; while ((num5 == 0) || base.isExistBall(list2, num5)) { num5 = random.Next(1, 0x11); } list2.Add(num5.ToString().PadLeft(2, '0')); } LotteryBase.CompareToAscii comparer = new LotteryBase.CompareToAscii(); al.Sort(comparer); list2.Sort(comparer); string str = ""; for (int m = 0; m < al.Count; m++) { str = str + al[m].ToString() + " "; } str = str + "+ "; for (int n = 0; n < list2.Count; n++) { str = str + list2[n].ToString() + " "; } builder.Append(str.Trim() + "\n"); } string str2 = builder.ToString(); return str2.Substring(0, str2.Length - 1); }
public override string BuildNumber(int Num, int Type) { if (((((Type != 10) && (Type != 9)) && ((Type != 8) && (Type != 7))) && (((Type != 6) && (Type != 5)) && ((Type != 4) && (Type != 3)))) && ((Type != 2) && (Type != 1))) { Type = 10; } Random random = new Random(); StringBuilder builder = new StringBuilder(); ArrayList al = new ArrayList(); for (int i = 0; i < Num; i++) { string str = ""; for (int j = 0; j < Type; j++) { int ball = 0; while ((ball == 0) || base.isExistBall(al, ball)) { ball = random.Next(1, 0x51); } al.Add(ball.ToString().PadLeft(2, '0')); } LotteryBase.CompareToAscii comparer = new LotteryBase.CompareToAscii(); al.Sort(comparer); for (int k = 0; k < al.Count; k++) { str = str + al[k].ToString() + " "; } builder.Append(str.Trim() + "\n"); } string str2 = builder.ToString(); return str2.Substring(0, str2.Length - 1); }