private void defineTest() { FormDefineTest defineTest = new FormDefineTest(CultureInfo.CurrentUICulture); try { var result = defineTest.ShowDialog(); if (result == DialogResult.OK) { string progName = defineTest.returnValues[1]; executingNameLabel.Text = progName; executingTypeLabel.Text = defineTest.returnValues[0]; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private string[] defineTest() { FormDefineTest defineTest = new FormDefineTest(); try { var result = defineTest.ShowDialog(); if (result == DialogResult.OK) { return(defineTest.returnValues); } else { /*do nothing*/ } } catch (Exception ex) { MessageBox.Show(ex.Message); } return(null); }