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