Exemple #1
0
 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.";
 }
Exemple #2
0
 static void Main(string[] args)
 {
     Markov chain = new Markov();
 }