Example #1
0
        public HueService(IConfigHandler configHandler)
        {
            this.configHandler = configHandler;
            config             = configHandler.LoadFromFile();
            baseUrl            = config.HueConfig.BridgeUrl;
            client             = new RestClient(baseUrl);

            TryLoadUser();
        }
Example #2
0
        public SettingsViewModel(
            IWindowService windowService,
            IConfigHandler configHandler,
            IFavoritesService favoritesService,
            IStatusSetter statusSetter,
            IHueService hueService)
        {
            this.windowService    = windowService;
            this.favoritesService = favoritesService;
            this.statusSetter     = statusSetter;
            this.hueService       = hueService;
            config = configHandler.LoadFromFile();

            StartSkypeAndSteamCommand = new RelayCommand(OnStartSkypeAndSteamCommand);
            EditFavoritesCommand      = new RelayCommand(OnEditFavoritesCommand);
            RegisterHueCommand        = new RelayCommand(OnRegisterHueCommand);
            AboutCommand          = new RelayCommand(OnAboutCommand);
            ClearFavoritesCommand = new RelayCommand(OnClearFavoritesCommand);
            ExitProgramCommand    = new RelayCommand(OnExitProgramCommand);
        }