public App() { var model = new FlightGearModel(new AsyncTcpFGClient(), new PluginFlightAnomalyDetector()); GeneralVM = new GeneralViewModel(model); GraphsVM = new GraphsViewModel(model); PlayBackVM = new PlayBackViewModel(model); RudderVM = new RudderViewModel(model); StatisticsVM = new StatisticsViewModel(model); }
public MainWindowViewModel() { this.model = FlightGearModel.Instance(); model.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e) { NotifyPropertyChanged("VM_" + e.PropertyName); }; }
IFlightModel model; // Contain instance of model FG. public FlightBoardViewModel() { this.model = FlightGearModel.Instance(); // Register as listener to notify property changes. this.model.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e) { NotifyPropertyChanged("VM_" + e.PropertyName); }; }