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