public MainController() { Settings = new Settings(); Monitors = new ObservableCollection <MonitorViewModel>(); BindingOperations.EnableCollectionSynchronization(Monitors, _monitorsLock); NotifyIconContainer = new NotifyIconContainer(); NotifyIconContainer.MouseLeftButtonClick += OnMainWindowShowRequested; NotifyIconContainer.MouseRightButtonClick += OnMenuWindowShowRequested; _settingsWatcher = new SettingsWatcher(); _powerWatcher = new PowerWatcher(); _brightnessWatcher = new BrightnessWatcher(); }
public AppControllerCore(AppKeeper keeper, SettingsCore settings) { this._keeper = keeper ?? throw new ArgumentNullException(nameof(keeper)); this.Settings = settings ?? throw new ArgumentNullException(nameof(settings)); LanguageService.SwitchDefault(); Monitors = new ObservableCollection <MonitorViewModel>(); BindingOperations.EnableCollectionSynchronization(Monitors, _monitorsLock); NotifyIconContainer = new NotifyIconContainer(); _displayWatcher = new DisplayWatcher(); _powerWatcher = new PowerWatcher(); _brightnessWatcher = new BrightnessWatcher(); }
public MainController(StartupAgent agent) { Settings = new Settings(); StartupAgent = agent ?? throw new ArgumentNullException(nameof(agent)); Monitors = new ObservableCollection <MonitorViewModel>(); BindingOperations.EnableCollectionSynchronization(Monitors, _monitorsLock); NotifyIconContainer = new NotifyIconContainer(); NotifyIconContainer.MouseLeftButtonClick += OnMainWindowShowRequestedBySelf; NotifyIconContainer.MouseRightButtonClick += OnMenuWindowShowRequested; _settingsWatcher = new SettingsWatcher(); _powerWatcher = new PowerWatcher(); _brightnessWatcher = new BrightnessWatcher(); }