public PlayerControlsViewModel(TimeManager timeManager) { this.timeManager = timeManager; Observer = new PropertyObserver<TimeManager>(this.timeManager); Observer.RegisterHandler(n => n.FactorTemporal, n => base.RaisePropertyChanged("TimeLapse")) .RegisterHandler(n => n.IsPlaying, n => base.RaisePropertyChanged("IsPlaying")) .RegisterHandler(n => n.ActualTime, n => base.RaisePropertyChanged("ActualTime")); }
public MainWindowViewModel(SateliteDataList model, TimeManager timeManager) { ControlesViewModel = new PlayerControlsViewModel(timeManager); Acciones = new ObservableCollection<string>(); Actitudes = new ObservableCollection<string>(); uiContext = SynchronizationContext.Current; timer = new Timer(timer_Elapsed, null, 2000, 300); this.model = model; this.timeManager = timeManager; this.timeManager.Model = this.model; }