Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MultiWindow"/> class.
 /// </summary>
 public MultiWindow()
 {
     InitializeComponent();
     this.model       = new ApplicationMultiModel();
     mvm              = new MultiViewModel(this.model);
     this.DataContext = mvm;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PlayMultiWindow"/> class.
 /// </summary>
 /// <param name="model">The model.</param>
 public PlayMultiWindow(IMultiModel model)
 {
     InitializeComponent();
     this.pmvm                    = new MultiViewModel(model);
     this.DataContext             = this.pmvm;
     this.pmvm.PlayerWinEvent    += gameFinished;
     this.pmvm.PlayerLoseEvent   += LosegameFinished;
     this.pmvm.NoConnectionEvent += NoConnections;
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MultiViewModel"/> class.
 /// </summary>
 /// <param name="model">The model.</param>
 public MultiViewModel(IMultiModel model)
 {
     this.model = model;
     this.model.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e)
     { NotifyPropertyChanged("VM_" + e.PropertyName); };
 }