Пример #1
0
        private void PullWeather()
        {
            var response = PullValue(nameof(IOutdoorService));
            var value    = (string)response["Weather"];
            var weather  = (WeatherCondition)Enum.Parse(typeof(WeatherCondition), value);

            if (Settings.UseWeather)
            {
                _outdoorService.UpdateCondition(weather);
            }
        }
Пример #2
0
        private void PushData()
        {
            if (Settings.UseTemperature)
            {
                _outdoorService.UpdateTemperature(Temperature);
            }

            if (Settings.UseHumidity)
            {
                _outdoorService.UpdateHumidity(Humidity);
            }

            if (Settings.UseSunriseSunset)
            {
                _daylightService.Update(Sunrise, Sunset);
            }

            if (Settings.UseWeather)
            {
                _outdoorService.UpdateCondition(Condition);
            }
        }