private void ButtonGenererCodeTiers_Click(object sender, EventArgs e) { buttonGenererCodeTiers.Enabled = false; Application.DoEvents(); List <string> ListCaracteres = new List <string>(); ListCaracteres.AddRange(HelperClass.AddNumbers()); ListCaracteres.AddRange(HelperClass.AddCharacters()); List <string> forbiddenCaracteres = new List <string> { "0", "1", "l", "I" }; textBoxCodeTiers.Text = HelperClass.GenerateCode(8, ListCaracteres, forbiddenCaracteres); buttonGenererCodeTiers.Enabled = true; }
private void ButtonSequenceSuivie_Click(object sender, EventArgs e) { buttonSequenceSuivie.Enabled = false; Application.DoEvents(); List <string> ListCaracteres = new List <string>(); ListCaracteres.AddRange(HelperClass.AddNumbers()); ListCaracteres.AddRange(HelperClass.AddCharacters()); List <string> forbiddenCaracteres = new List <string> { "0", "1", "l", "I" }; string premierElement = HelperClass.GenerateCode(8, ListCaracteres, forbiddenCaracteres); listBoxSequenceSuivie.Items.Add(premierElement); string deuxiemeElement = HelperClass.GenerateNextItem(premierElement); listBoxSequenceSuivie.Items.Add(deuxiemeElement); buttonSequenceSuivie.Enabled = true; }