コード例 #1
0
 private void CommandExecuted(object sender, ExecutedRoutedEventArgs e)
 {
     if (e.Command == ApplicationCommands.Close)
     {
         this.Close();
     }
     if (e.Command == GameViewModel.StartGameCommand)
     {
         model = new GameViewModel();
         var options = GameOptions.Create();
         options.Save();
         model.StartNewGame();
         DataContext           = model;
         PlayButton.Visibility = Visibility.Visible;
         PassButton.Visibility = Visibility.Visible;
     }
     e.Handled = true;
 }
コード例 #2
0
 public GameViewModel()
 {
     _players          = new List <Player>();
     this._gameOptions = GameOptions.Create();
 }
コード例 #3
0
 public options()
 {
     _gameOptions = GameOptions.Create();
     DataContext  = _gameOptions;
     InitializeComponent();
 }