/// <summary> /// Called when the user tries to clear the text box /// Silly user /// </summary> private void ClearCell(int row, int col) { if (grid.IsEditable(row, col) && isEditable) { grid.Clear(row, col); boxes[row][col].Text = ""; if (this.onClear != null) { this.onClear(row, col); } } }
/// <summary> /// When the File -> Save Game Unsolved menu item is chosen /// </summary> private void FileSaveGameUnsolvedClick(object sender, EventArgs e) { Grid unsolvedGrid = grid.Copy(); unsolvedGrid.ForEachSquare((row, col, val) => { if (unsolvedGrid.IsEditable(row, col)) { unsolvedGrid.Clear(row, col); } }); GameManager.SaveGame(unsolvedGrid); }