getRandomText() public method

public getRandomText ( int wordCount ) : string
wordCount int
return string
コード例 #1
0
ファイル: Form1.cs プロジェクト: yalue/Markov-Text
 private void generateTextButton_Click(object sender, EventArgs e)
 {
     if (inputFileBox.Text.Equals(""))
     {
         MessageBox.Show("Enter a file to open first.");
         return;
     }
     if (getWordCount() < 3) wordCountBox.Text = "3";
     if (getWordCount() > 1000000) wordCountBox.Text = "1000000";
     this.status = "Calculating text...";
     Markov markov = new Markov(getRandomnessLevel(), inputFileBox.Text, this);
     outputForm outForm = new outputForm();
     outForm.Owner = this;
     outForm.outputBoxContents = markov.getRandomText(getWordCount());
     outForm.Show();
     this.status = "done.";
 }