para los que conocen ya con esto es más fácil hallar los seriales! por supuesto no es mi caso.
Código
private void button1_Click(object sender, EventArgs e) { string text = this.textBox1.Text; int[] array = new int[11]; int i = 0; this.rear(array); if (text.Length > 6 && text.Length < 12) { while (i < text.Length) { array[i] = this.Asc(text[i].ToString()); i++; } this.arr(ref array, array.Length); int num = this.sum(array, 10); if (num > 1245 & num < 1250) { if (array[0] + array[1] > 125 && array[0] + array[1] < 150) { if (array[3] == array[5]) { this.label2.ForeColor = Color.Green; this.label2.Text = "CORRECTO :)"; } else { this.label2.ForeColor = Color.Red; this.label2.Text = "INCORRECTO"; } } else { this.label2.ForeColor = Color.Red; this.label2.Text = "INCORRECTO"; } } else { this.label2.ForeColor = Color.Red; this.label2.Text = "INCORRECTO"; } } else { this.label2.ForeColor = Color.Red; this.label2.Text = "INCORRECTO"; } } public int sum(int[] v, int cant) { int result; if (cant > -1) { result = v[cant] + this.sum(v, cant - 1); } else { result = 0; } return result; } public void rear(int[] clav) { for (int i = 0; i < clav.Length; i++) { clav[i] = 0; } } public void arr(ref int[] clav, int cant) { if (cant > 1) { for (int i = 0; i < cant - 1; i++) { if (clav[i] > clav[i + 1]) { int num = clav[i]; clav[i] = clav[i + 1]; clav[i + 1] = num; } } this.arr(ref clav, cant - 1); } }
MOD EDIT: Usar etiquetas GeSHi para colocar código.
Me olvidé! acá está el archivo limpio por si lo quieren revisar!
http://www.mediafire.com/download/57ciujbh35y3ra8/Go__II.rar
el pass es: a
MOD EDIT: No hacer doble post.