コード例 #1
0
 public PutStoneCommand(BoardSquareViewModel BoardSquareViewModel)
 {
     this.BoardSquareViewModel = BoardSquareViewModel;
     this.BoardSquareViewModel.PropertyChanged += (sender, e) =>
     {
         CanExecuteChanged?.Invoke(this, new EventArgs());
     };
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
 public PutStone(BoardSquareViewModel square)
 {
     this.square = square;
     this.square.game.ValueChanged += () => CanExecuteChanged(this, EventArgs.Empty);
 }
コード例 #4
0
 public PutStoneCommand(BoardSquareViewModel square, ReversiGame game)
 {
     this.Square = square;
     this.Game   = game;
 }
コード例 #5
0
 public SelectSquareCommand(BoardSquareViewModel vm, Cell <bool> isValidMove)
 {
     _viewmodel = vm;
     isValidMove.ValueChanged += () => CanExecuteChanged(this, EventArgs.Empty);
 }