public PutStoneCommand(BoardSquareViewModel BoardSquareViewModel) { this.BoardSquareViewModel = BoardSquareViewModel; this.BoardSquareViewModel.PropertyChanged += (sender, e) => { CanExecuteChanged?.Invoke(this, new EventArgs()); }; }
public void SetWidth(int w) { this.width = w; for (int i = 0; i < width; i++) { var square = new BoardSquareViewModel(Game); square.Text = i.ToString(); Squares.Add(square); } }
public PutStone(BoardSquareViewModel square) { this.square = square; this.square.game.ValueChanged += () => CanExecuteChanged(this, EventArgs.Empty); }
public PutStoneCommand(BoardSquareViewModel square, ReversiGame game) { this.Square = square; this.Game = game; }
public SelectSquareCommand(BoardSquareViewModel vm, Cell <bool> isValidMove) { _viewmodel = vm; isValidMove.ValueChanged += () => CanExecuteChanged(this, EventArgs.Empty); }