/// <summary> /// Copie de la liste des combinaisons dans le presse-papier. /// </summary> private void ProcessCopy() { try { ClassWordsCombinations.CopyStringListToClipboard(listCombinations); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
/// <summary> /// Appel de la classe de calcul des combinaisons pour récupérer la liste et chargement dans le controle listbox dédié. /// </summary> private void ProcessCombinations() { try { if (this.LstInitialWords.Items.Count == 0) { return; } this.Enabled = false; listCombinations = ClassWordsCombinations.ConstructCombinationsList(this.LstInitialWords.Items.Cast <string>().ToList()); this.LstResults.Items.Clear(); this.LstResults.Items.AddRange(listCombinations.ToArray()); this.LbWords.Text = "Mots (" + this.LstInitialWords.Items.Count.ToString() + ") :"; this.LbCombinations.Text = "Combinaisons (" + this.listCombinations.Count.ToString() + ") :"; } catch (Exception ex) { MessageBox.Show(ex.ToString()); } this.Enabled = true; }