private void random_Click(object sender, EventArgs e) { if (promptUnsaved()) { currentExcuse = new Excuse(selectedPath, rand); UpdateForm(false); } }
// call the Excuse object methods to open and save, somehow? private void open_Click(object sender, EventArgs e) { if (promptUnsaved()) { openFileDialog1.InitialDirectory = selectedPath; if (openFileDialog1.ShowDialog() == DialogResult.OK) { currentExcuse = new Excuse(openFileDialog1.FileName); currentExcuse.OpenFile(currentExcuse.ExcusePath); UpdateForm(false); } } }