private void btnFilter_Click(object sender, EventArgs e) { int timeStart = 0; int timeEnd = 0; #region 验证过滤时间范围的输入 try { timeStart = int.Parse(txtTimeStart.Text); } catch { MessageBox.Show("请输入分钟0-59。"); return; } if (timeStart < 0 || timeStart > 59) { MessageBox.Show("请输入分钟0-59。"); return; } try { timeEnd = int.Parse(txtTimeEnd.Text); } catch { MessageBox.Show("请输入分钟0-59。"); return; } if (timeEnd < 0 || timeEnd > 59) { MessageBox.Show("请输入分钟0-59。"); return; } if (timeStart >= timeEnd) { MessageBox.Show("过滤时间范围输入错误,应先小后大。"); return; } #endregion SetRptData(); frmRptOdds frmRptOdds = new frmRptOdds(GameForRpt, DtForRpt); frmRptOdds.ShowDialog(); }