/// <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; }
/// <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 }
/// <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); }; }
public WheelsControlVM(IFightSimulatorModel model) { this.model = model; }