public ShellViewModel( ISettingsService settingsService, IScreenManager screenManager, ITimerFactory timerFactory, IWindowManager windowManager, IMessageProvider messageProvider) { this.settingsService = settingsService; this.messageProvider = messageProvider; Keys = new ObservableCollection <Message>(); Screens = new ObservableCollection <DetailedScreen>(screenManager.GetScreens()); Settings = settingsService.Get <Settings>("PopupSettings"); if (Settings == null) { Settings = new Settings(); SetDefaultSettings(); } PlaceScreen(); windowManager.ShowWindow(new KeyShowViewModel(Keys, Settings)); timerToken = timerFactory.Start(1000, Cleanup); }
public ShellViewModel( ISettingsProvider settingsProvider, IScreenManager screenManager, ITimerFactory timerFactory, IWindowManager windowManager, IMessageProvider messageProvider) { this.settingsProvider = settingsProvider; this.messageProvider = messageProvider; Keys = new ObservableCollection <Message>(); Screens = new ObservableCollection <DetailedScreen>(screenManager.GetScreens()); Settings = settingsProvider.GetSettings <PopupSettings>(); PlaceScreen(); keyShowViewModel = new KeyShowViewModel(Keys, Settings); windowManager.ShowWindow(keyShowViewModel); timerToken = timerFactory.Start(1000, Cleanup); }