public WeatherData[] WeatherDataNow()
        {
            WeatherNow now = new WeatherNow(); //содержит все Xpath

            WeatherData[] DataNow = DefineWeather(now.Url, now.XPathTemp_1, now.XPathTemp_2, now.XPathPressure,
                                                  now.XPathWindSpeed, null, now.XPathWindDirection, now.XPathHumidity, now.XPathWater, (int)Param.paramNow);
            return(DataNow);
        }
Example #2
0
 public static WeatherNow Parse(JObject json)
 {
     WeatherNow weather = new WeatherNow()
     {
         Temp=(string)json["l"]["l1"],
         Humidity=(string)json["l"]["l2"],
         WindForce=(string)json["l"]["l3"],
         WindDiretion=WindDirectionCode.Parse((string)json["l"]["l4"]),
         PublicTime = DateTime.ParseExact((string)json["l"]["l7"], "HH:mm", null)
     };
     return weather;
 }