예제 #1
0
 /// <summary>
 /// Constructor: gets the model as needed in MVVM architecutre.
 /// </summary>
 /// <param name="m">The model of this current view (as demanded in MVVM architecture)</param>
 public SimulatorWindow(IFightSimulatorModel m)
 {
     this.model = m;
     InitializeComponent();
     //WheelsControlVM wcVM = new WheelsControlVM();
     //wheelsControl.DataContext = wcVM;
 }
예제 #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 public MainWindow()
 {
     InitializeComponent();
     this.model   = new FlightSimulatorModel(new MyTelnetClient());
     fs_ViewModel = new FlightSimulatorViewModel(this.model);
     DataContext  = fs_ViewModel; //here for binding the ip, port, etc
 }
예제 #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="model">The model in the MVVM architecture</param>
 public FlightSimulatorViewModel(IFightSimulatorModel model)
 {
     this.model             = model;
     model.PropertyChanged +=
         delegate(Object sender, PropertyChangedEventArgs e)
     {
         NotifyPropertyChanged("VM_" + e.PropertyName);
     };
 }
예제 #4
0
 public WheelsControlVM(IFightSimulatorModel model)
 {
     this.model = model;
 }