示例#1
0
        public BarViewModel(ICalendarService calendarService, 
            IUserService userService, ILifetimeScope scope, 
            IDeviceService deviceService, IBarConfigService barConfig)
        {
            _calendarService = calendarService;
            _userService = userService;
            _scope = scope;
            _deviceService = deviceService;
            _barConfig = barConfig;
            NowViewModel = scope.Resolve<NowViewModel>();
            Width = deviceService.WindowWidth;

            this.Register<ShowEventPopupMessage>(_showEventPopup);
            this.Register<HideEventPopupMessage>(_hideEventPopup);
            this.Register<RefreshCalendarMessage>(_onRefreshCalendar);
            this.Register<ShowTomorrowMessage>(_onShowTomorrow);

            _timer = new Timer();
            _timer.Interval = 5000;
            _timer.Elapsed += T_Elapsed;
            _timer.Start();
        }
示例#2
0
 public DeviceService(IBarConfigService barConfigService)
 {
     _barConfigService = barConfigService;
 }