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