private void loadTestDataToolStripMenuItem_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show("Are you sure you want to load test data? This will " + "delete all current data.", "Load test data", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); if (result.Equals(DialogResult.OK)) { dgvBets.DataSource = null; betHandler = new BetDataHandler(BetTestData.GetHotTipsterTestData().ToList()); dgvBets.DataSource = betHandler; } }
private void MainForm_Load(object sender, EventArgs e) { betHandler = new BetDataHandler(); dgvBets.DataSource = betHandler; }