private void buttonOpen_Click(object sender, EventArgs e) { openFileDialog.InitialDirectory = selectedFolder; openFileDialog.Filter = "Text files (*.txt) | *.txt | All files (*.*) | *.*"; openFileDialog.FileName = textBoxExcuseDescription.Text + ".txt"; DialogResult result = openFileDialog.ShowDialog(); if (result == DialogResult.OK) { currentExcuse = new Excuse(openFileDialog.FileName); } UpdateForm(false); }
private void buttonRandom_Click(object sender, EventArgs e) { currentExcuse = new Excuse(random, selectedFolder); UpdateForm(false); }