protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); try { _settings = SerializationHelper.LoadObjectFromFile<AmbilightSettings>(PATH_SETTINGS) ?? new AmbilightSettings(); IScreenCapture screenCapture = new DX9ScreenCapture(); // DarthAffe 05.11.2016: This could be done way cleaner ... _taskBar = FindResource("Taskbar") as TaskbarIcon; FrameworkElement configView = _taskBar?.TrayPopup as ConfigView; if (configView == null) Shutdown(); else configView.DataContext = new ConfigViewModel(_settings); _ambilight = new Ambilight(screenCapture, _settings); if (!_ambilight.Initialize()) throw new ApplicationException(); } catch { MessageBox.Show("An error occured while starting the Keyboard-Ambilight.\r\nPlease double check if CUE is running and 'Enable SDK' is checked.", "Can't start Keyboard-Ambilight"); Shutdown(); } }
public AmbilightMirrorBrush(IScreenCapture screenCapture, AmbilightSettings settings) : base(screenCapture, settings) { }
public AmbilightExtendBrush(IScreenCapture screenCapture, AmbilightSettings settings) : base(screenCapture, settings) { }
public AbstractAmbilightBrush(IScreenCapture screenCapture, AmbilightSettings settings) { this.ScreenCapture = screenCapture; this.Settings = settings; }
public Ambilight(IScreenCapture screenCapture, AmbilightSettings settings) { this._screenCapture = screenCapture; this._settings = settings; }