private void buttonCreate_Click(object sender, EventArgs e) { try { param = read_param(); create(); } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } // DialogResult = DialogResult.OK; }
private STParamReportAboutGame read_param() { STParamReportAboutGame ret = new STParamReportAboutGame(); int rank = 1; int g1 = 0; int g2 = 0; try { ret.idseason = IS.idseason; if (textBoxGame1.Text.Length > 0) { g1 = int.Parse(textBoxGame1.Text.Trim()); } if (textBoxGame2.Text.Length > 0) { g2 = int.Parse(textBoxGame2.Text.Trim()); if (g1 <= g2) { rank = g2 - g1 + 1; ret.arr_games = new int[rank]; for (int i = 0; i < rank; i++) { ret.arr_games[i] = g1 + i; } } } else { ret.arr_games = new int[rank]; ret.arr_games[0] = g1; } } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } return(ret); }