/* Raised when there is an update in the grid. */ public void RaiseUpdateEvent() { if (GridUpdateEvent != null) { GridUpdateEvent.Invoke(); } }
private void UpdateBy(GridUpdateEvent results) { foreach (var result in results.GridUpdates) { UpdateGrids(result); } lblStatus.Text = results.Summary; }
private void dgPlayerShips_CellClick(object sender, DataGridViewCellEventArgs e) { // TODO: test that clicks aren't too rapid // TODO: pub/sub controller + form control GridUpdateEvent results = _battleshipsGame.GetMoveResults(IsPlayerGrid, e.ColumnIndex, e.RowIndex); UpdateBy(results); }