Пример #1
0
 private void cancelButton_Click(object sender, RoutedEventArgs e)
 {
     _gameOptions = null;
     Close();
 }
Пример #2
0
 public Options()
 {
     _gameOptions = GameOptions.Create();
     DataContext  = _gameOptions;
     InitializeComponent();
 }
Пример #3
0
 void StartGame_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
 {
     _gameOptions = DataContext as GameOptions;
     ChangeListBoxOptions();
 }
Пример #4
0
 //添加一个新的默认构造函数
 public GameViewModel()
 {
     _players     = new List <Player>();
     _gameOptions = GameOptions.Create();
 }