示例#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();
 }
 //添加一个新的默认构造函数
 public GameViewModel()
 {
     _players     = new List <Player>();
     _gameOptions = GameOptions.Create();
 }