public void SetPredefined(int squareNr, byte?value) { SquareViewModel squareView = this.GetSquare(squareNr); squareView.Value = value; squareView.IsPredefinedValue = value.HasValue; squareView.IsValueCorrect = null; }
private void CheckInputForSquare(SquareViewModel square, byte?expectedValue) { if (!square.IsPredefinedValue && square.Value.HasValue) { square.IsValueCorrect = expectedValue.HasValue ? expectedValue.Value == square.Value : (bool?)null; } }