Example #1
0
        public AppViewModel(IHmxWindowManager windowManager, IRecordingManager recordingManager, ILogger logger, ITimer timer, ISettingsProvider settingsProvider)
            : base(windowManager)
        {
            RecordingManager = recordingManager;
            _settingsProvider = settingsProvider;

            _logger = logger;
            _pollingTimer = timer;
            _pollingTimer.TimerElapsed += PollingTimerElapsed;
            var setting = settingsProvider.GetSetting("PollingTimeSpanInMinutes");
            _pollingTimer.Interval = TimeSpan.FromMinutes(Convert.ToDouble(setting)).TotalMilliseconds;

            new SQLiteConfiguration();
        }
Example #2
0
        protected override void Configure()
        {
            base.Configure();

            _windowManager = new HmxWindowManager();
            var logger = LogManager.GetCurrentClassLogger();
            _container.RegisterPerRequest(typeof(ITaskRunner), null, typeof(TaskRunner));
            _container.RegisterInstance(typeof(IWindowManager), null, _windowManager);
            _container.RegisterInstance(typeof(IHmxWindowManager), null, _windowManager);
            _container.RegisterInstance(typeof(ILog), null, logger);
            _container.RegisterPerRequest(typeof(ISettingsProvider), null, typeof(SettingsProvider));
            _container.RegisterPerRequest(typeof(ITimer), null, typeof(Timer));
            _container.RegisterPerRequest(typeof(IVlcDriver), null, typeof(VlcDriver)); // TODO Should be one per app
            _container.RegisterPerRequest(typeof(ILinearJobManager), null, typeof(LinearJobManager));
            _container.RegisterPerRequest(typeof(IRecordingManager), null, typeof(RecordingManager.RecordingManager));
            _container.RegisterPerRequest(typeof(IAppViewModel),null, typeof(AppViewModel));
        }
Example #3
0
 public ViewModelBase(IHmxWindowManager windowManager)
 {
     WindowManager = windowManager;
 }