public TimeShifterViewModel(TimeShiftProvider timeShiftProvider) { _timeShiftProvider = timeShiftProvider; _timeShiftProvider.TimeShiftCleared += _timeShiftProvider_TimeShiftCleared; StartShift = new RelayCommand(() => { _timeShiftProvider.StartTimeShift(); }); EndShift = new RelayCommand(() => { _timeShiftProvider.EndTimeShift(); }); }
public DefaultClock(TimeShiftProvider timeShiftProvider) { _timeShiftProvider = timeShiftProvider; _timer.Interval = TimeSpan.FromSeconds(1); _timer.Start(); _timer.Tick += OnTick; _timeShiftProvider.TimeShiftStateChanged += TimeShiftProviderTimeShiftStateChanged; Window.Current.SizeChanged += Current_SizeChanged; }
public TimeMenuViewModel(TimeShiftProvider timeShiftProvider) { _timeShiftProvider = timeShiftProvider; ClearTimeShift = new RelayCommand(() => _timeShiftProvider.Clear()); }
public TimeSetterViewModel(TimeShiftProvider timeShiftProvider, IDataRepository dataRepository) { _timeShiftProvider = timeShiftProvider; _dataRepository = dataRepository; _timeShiftProvider.TimeShiftCleared += _timeShiftProvider_TimeShiftCleared; }