private void loadFileButton_Click(object sender, EventArgs e) { fileLoader.LoadFiles(); OpenFileDialog openFileDialog1 = new OpenFileDialog(); DialogResult result = openFileDialog1.ShowDialog(); // Show the dialog. if (result == DialogResult.OK) { string fileName = openFileDialog1.FileName; StreamReader sr = new StreamReader(fileName); paragraph = sr.ReadToEnd(); sr.Dispose(); } }
public Form1() { InitializeComponent(); fileLoader = new FileLoader(); fileLoader.LoadFiles(); }