public MainWindow(IGraphService graphService, IHueService hueService, LIFXService lifxService, IYeelightService yeelightService, IOptionsMonitor <ConfigWrapper> optionsAccessor, LIFXOAuthHelper lifxOAuthHelper) { InitializeComponent(); System.Windows.Application.Current.SessionEnding += new SessionEndingCancelEventHandler(Current_SessionEnding); LoadAboutMe(); _graphservice = graphService; _yeelightService = yeelightService; _lifxService = lifxService; _hueService = hueService; _options = optionsAccessor.CurrentValue; _lIFXOAuthHelper = lifxOAuthHelper; LoadSettings().ContinueWith( t => { if (t.IsFaulted) { } this.Dispatcher.Invoke(() => { LoadApp(); var tbContext = notificationIcon.DataContext; DataContext = Config; notificationIcon.DataContext = tbContext; }); }); }
public MainWindow(IGraphService graphService, IHueService hueService, LIFXService lifxService, IYeelightService yeelightService, IRemoteHueService remoteHueService, ICustomApiService customApiService, IOptionsMonitor <BaseConfig> optionsAccessor, LIFXOAuthHelper lifxOAuthHelper, DiagnosticsClient diagClient, ILogger <MainWindow> logger, ISettingsService settingsService) { _logger = logger; InitializeComponent(); System.Windows.Application.Current.SessionEnding += new SessionEndingCancelEventHandler(Current_SessionEnding); LoadAboutMe(); _graphservice = graphService; _yeelightService = yeelightService; _lifxService = lifxService; _hueService = hueService; _remoteHueService = remoteHueService; _customApiService = customApiService; _options = optionsAccessor != null ? optionsAccessor.CurrentValue : throw new NullReferenceException("Options Accessor is null"); _lIFXOAuthHelper = lifxOAuthHelper; _diagClient = diagClient; _settingsService = settingsService; LoadSettings().ContinueWith( t => { if (t.IsFaulted) { } this.Dispatcher.Invoke(() => { LoadApp(); var tbContext = notificationIcon.DataContext; DataContext = Config; notificationIcon.DataContext = tbContext; }); }, TaskScheduler.Current); }
public GetLightsHandler(IYeelightService service) { _service = service; }
public SetColorHandler(IYeelightService service) { _service = service; }