Ejemplo n.º 1
0
        public HourlyForecast(Value temp, Value pcpn, Value hum, Core.Models.Caiyun.JsonContract.Wind wind)
        {
            CultureInfo provider = CultureInfo.InvariantCulture;

            DateTime   = DateTime.ParseExact(temp.datetime, "yyyy-MM-dd HH:mm", provider);
            Temprature = Temperature.FromCelsius((float)temp.value);
            Wind       = new Wind(wind);
            Humidity   = (uint)(hum.value * 100);
            var p = (uint)(pcpn.value / 6.0 * 100);

            if (p > 100)
            {
                p = 100;
            }
            Pop = p;
        }
Ejemplo n.º 2
0
 public Wind(Core.Models.Caiyun.JsonContract.Wind wind)
 {
     Degree = (uint)wind.direction;
     Speed  = Speed.FromKMPH((uint)wind.speed);
 }