예제 #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();
 }