private void chkAutoAll_CheckedChanged(object sender, EventArgs e) { for (int i = 0; i < Matches.Count; i++) { Matches[i].AutoSend = chkAutoAll.Checked; } MatchSchedule.Refresh(); }
private void MatchSchedule_CellValueChanged(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0 && e.ColumnIndex == 1 /*MatchSchedule.Columns["Delay"].Index*/) { object value = MatchSchedule.Rows[e.RowIndex].Cells[e.ColumnIndex].Value; string minutesDelay = Matches[e.RowIndex].MinutesDelay; for (int i = e.RowIndex; i < MatchSchedule.RowCount - 1; i++) { Matches[i].MinutesDelay = minutesDelay; } MatchSchedule.Refresh(); } }
private void txtDelay_TextChanged(object sender, EventArgs e) { if (!int.TryParse(txtDelay.Text, out currDelay)) { MessageBox.Show("Delay must be an integer"); } for (int i = 0; i < MatchSchedule.RowCount - 1; i++) { if (Matches[i].OriginalTimeAsDateTime >= DateTime.Now) { Matches[i].MinutesDelay = txtDelay.Text; } } MatchSchedule.Refresh(); }