Exemple #1
0
        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();
        }
Exemple #2
0
        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();
        }
Exemple #3
0
        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();
        }