/// <summary>
 /// Initializes a new instance of the <see cref="SingleWindow"/> class.
 /// </summary>
 public SingleWindow()
 {
     InitializeComponent();
     this.model       = new SingleModel();
     svm              = new SingleViewModel(this.model);
     this.DataContext = svm;
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the PlaySingleWindow class.
 /// </summary>
 /// <param name="model">The model.</param>
 public PlaySingleWindow(ISingleModel model)
 {
     InitializeComponent();
     this.model                = model;
     this.psvm                 = new PlaySingleViewModel(this.model);
     this.DataContext          = this.psvm;
     this.psvm.PlayerWinEvent += gameFinished;
 }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PlaySingleViewModel"/> class.
 /// </summary>
 /// <param name="model">The model.</param>
 public PlaySingleViewModel(ISingleModel model)
 {
     this.model = model;
     this.model.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e)
     { NotifyPropertyChanged("VM_" + e.PropertyName); };
 }