public HueService(IConfigHandler configHandler) { this.configHandler = configHandler; config = configHandler.LoadFromFile(); baseUrl = config.HueConfig.BridgeUrl; client = new RestClient(baseUrl); TryLoadUser(); }
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); }