private void selectProgramButton_Click(object sender, EventArgs e) { using (ConfigureProgram cp = new ConfigureProgram(_program)) { if (cp.ShowDialog() == System.Windows.Forms.DialogResult.OK) { _filePath = cp.ProgramName; _runLength = cp.ProgramDuration; programLabel.Text = GetName(); } } }