Ejemplo n.º 1
0
        public static int[] GetArrayTemp(OpenWeatherForecast.OpenWeatherForecast weath, int size)
        {
            int[] masive = new int[size];

            for (int i = 0; i < size; i++)
            {
                masive[i] = (int)weath.list[i].main.temp;
            }

            return(masive);
        }
Ejemplo n.º 2
0
        public static Image[] GetArrayImg(OpenWeatherForecast.OpenWeatherForecast weath, int size)
        {
            Image[] masive = new Image[size];

            for (int i = 0; i < size; i++)
            {
                masive[i] = weath.list[i].weather[0].Icon;
            }


            return(masive);
        }
Ejemplo n.º 3
0
        public static string[] GetArrayData(OpenWeatherForecast.OpenWeatherForecast weath, int size)
        {
            string[] masive = new string[size];

            for (int i = 0; i < size; i++)
            {
                masive[i] = weath.list[i].dt_txt;
            }


            return(masive);
        }
Ejemplo n.º 4
0
        private double GetMinTemp(OpenWeatherForecast.OpenWeatherForecast ow, int start, int stop)
        {
            double temp = ow.list[start].main.temp;

            for (int i = start; i < stop; i++)
            {
                if (temp > ow.list[i].main.temp)
                {
                    temp = ow.list[i].main.temp;
                }
            }
            return(temp);
        }
Ejemplo n.º 5
0
        public static void SetInf(string originUrl, out OpenWeatherForecast.OpenWeatherForecast weather)
        {
            Adaptee adaptee = new Adaptee();

            weather = JsonConvert.DeserializeObject <OpenWeatherForecast.OpenWeatherForecast>(adapter.GetData(adaptee, originUrl));
        }