public MainViewModel( [NotNull] IRecentFileListPersister persister, [NotNull] IEventAggregator aggregator, [NotNull] IWindowManager windowManager, [NotNull] IPreferencesSerializer preferencesSerializer) { if (persister == null) { throw new ArgumentNullException(nameof(persister)); } if (aggregator == null) { throw new ArgumentNullException(nameof(aggregator)); } if (windowManager == null) { throw new ArgumentNullException(nameof(windowManager)); } if (preferencesSerializer == null) { throw new ArgumentNullException(nameof(preferencesSerializer)); } this.aggregator = aggregator; this.Persister = persister; this.windowManager = windowManager; this.preferencesSerializer = preferencesSerializer; aggregator.Subscribe(this); DebuggingProfile = new DebuggingProfileViewModel(); maestro = new Maestro(); timer = new Timer(state => CheckExitedProcesses(), null, TimeSpan.Zero, TimeSpan.FromSeconds(5)); }
public PreferencesViewModel([NotNull] IEventAggregator aggregator, [NotNull] IPreferencesSerializer preferencesSerializer) { if (aggregator == null) { throw new ArgumentNullException(nameof(aggregator)); } if (preferencesSerializer == null) { throw new ArgumentNullException(nameof(preferencesSerializer)); } this.aggregator = aggregator; this.preferencesSerializer = preferencesSerializer; }
public PreferencesViewModelWithSampleData(IEventAggregator aggregator, IPreferencesSerializer serializer) : base(aggregator, serializer) { DebugAllShortcut = new KeyCombination(Key.LeftCtrl, Key.LeftAlt, Key.MediaPlayPause); StartAllShortcut = new KeyCombination(Key.LeftCtrl, Key.LeftAlt, Key.LeftShift, Key.MediaPlayPause); }