示例#1
0
    private void getPasswordButton_Click(object sender, EventArgs e)
    {
      if (!this.VerifySettings())
      {
        return;
      }

      if (this.wordProvider == null)
      {
        var strings = InputReader.ReadWordsFromText(this.dictionaryLocationTextBox.Text);

        this.wordProvider = new WordProvider(strings);
      }

      var passwordProvider = new PasswordProvider(this.wordProvider);

      this.resultsLabel.Text = passwordProvider.GetPassword(int.Parse(this.minimumSizeTextbox.Text),
        this.delimiterTextBox.Text);
    }
 public PasswordProvider(WordProvider wordProvider)
 {
   this.wordProvider = wordProvider;
 }