-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForm1.cs
More file actions
45 lines (39 loc) · 1.46 KB
/
Form1.cs
File metadata and controls
45 lines (39 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using MarkovChainSentenceGenerator.Generator;
namespace MarkovChainSentenceGenerator
{
public partial class MarcusChainSentenceGenerator : Form
{
TextGenerator textGenerator;
public MarcusChainSentenceGenerator()
{
InitializeComponent();
textGenerator = new TextGenerator();
}
private void btnConan_Click(object sender, EventArgs e)
{
textView.Clear();
int numberOfWords = Convert.ToInt32(numWords.Value);
string folderName = "\\conan\\";
string text = textGenerator.PredifinedText(folderName, numberOfWords);
textView.Text = text;
}
private void btnLovecraft_Click(object sender, EventArgs e)
{
textView.Clear();
int numberOfWords = Convert.ToInt32(numWords.Value);
string folderName = "\\lovecraft\\";
string text = textGenerator.PredifinedText(folderName, numberOfWords);
textView.Text = text;
}
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
Font fnt = new Font(textView.Font.FontFamily, Convert.ToSingle(numSize.Value));
textView.Font = fnt;
}
private void MarcusChainSentenceGenerator_Load(object sender, EventArgs e)
{
Font fnt = new Font(textView.Font.FontFamily, Convert.ToSingle(numSize.Value));
textView.Font = fnt;
}
}
}