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(); }
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)); }
public ViewModelBase(IHmxWindowManager windowManager) { WindowManager = windowManager; }