Exemple #1
0
        public List <string> getPrecipTimeRadar()
        {
            WeatherAPI weatherAPI = new WeatherAPI(urlForRadar);

            precipRadarTimeList = weatherAPI.getPrecipRadarTimeList();
            return(precipRadarTimeList);
        }
Exemple #2
0
        public List <double> getPrecipRadar()
        {
            WeatherAPI weatherAPI = new WeatherAPI(urlForRadar);

            precipRadarList = weatherAPI.getPrecipList();
            return(precipRadarList);
        }
Exemple #3
0
        public int getCloudCover()
        {
            WeatherAPI weatherAPI = new WeatherAPI(urlForCurrent);

            currCloud = (int)weatherAPI.getCloudCover();
            return(currCloud);
        }
Exemple #4
0
        public string getCloudCoverType()
        {
            WeatherAPI weatherAPI = new WeatherAPI(urlForCurrent);

            currCloudType = weatherAPI.getCloudType();
            return(currCloudType);
        }
Exemple #5
0
        public List <double> getCloudRadar()
        {
            WeatherAPI weatherAPI = new WeatherAPI(urlForRadar);

            cloudRadarList = weatherAPI.getCloudRadarList();
            return(cloudRadarList);
        }
Exemple #6
0
        public List <string> getCloudTimeRadar()
        {
            WeatherAPI weatherAPI = new WeatherAPI(urlForRadar);

            cloudRadarTimeList = weatherAPI.getCloudTimeList();
            return(cloudRadarTimeList);
        }
Exemple #7
0
        public string getIcon()
        {
            WeatherAPI weatherAPI = new WeatherAPI(urlForCurrent);
            string     icon       = weatherAPI.getIcon();

            iconUrl = iIconUrl.Replace("@PIC@", icon);
            return(iconUrl);
        }
Exemple #8
0
        public DateTime getLastUpdate()
        {
            WeatherAPI weatherAPI = new WeatherAPI(urlForCurrent);
            string     dt         = weatherAPI.getLastUpdate();
            DateTime   oDate      = Convert.ToDateTime(dt);

            return(oDate);
        }
Exemple #9
0
        public string getIconForecast(DateTime d)
        {
            string     dateOfChecking = d.ToString("yyyy-MM-dd");
            WeatherAPI weatherAPI     = new WeatherAPI(urlForForecast);
            string     icon           = weatherAPI.getIconForecast(dateOfChecking);

            iconUrl = iIconUrl.Replace("@PIC@", icon);
            return(iconUrl);
        }
Exemple #10
0
        public string getPrecipType(DateTime date)
        {
            WeatherAPI weatherAPI = new WeatherAPI(urlForForecast);
            string     dateOfChecking;

            dateOfChecking = date.ToString("yyyy-MM-dd");
            precipType     = weatherAPI.getForecastType(dateOfChecking);

            return(precipType);
        }
Exemple #11
0
        public double getPressure()
        {
            WeatherAPI weatherAPI = new WeatherAPI(urlForCurrent);

            currPressure = weatherAPI.getPressure();
            if (Weather.isImperial)
            {
                return(currPressure);
            }
            else
            {
                return((double)(currPressure / 1013.25));
            }
        }
Exemple #12
0
        public double getWindSpeed()
        {
            WeatherAPI weatherAPI = new WeatherAPI(urlForCurrent);

            currWind = (double)weatherAPI.getWindSpeed();
            if (Weather.isImperial)
            {
                return(currWind);
            }
            else
            {
                return(currWind * 1.6);
            }
        }
Exemple #13
0
        public double getCurrentTemperature()
        {
            WeatherAPI weatherAPI = new WeatherAPI(urlForCurrent);

            currTemperature = (double)weatherAPI.getTemperature();
            if (Weather.isImperial)
            {
                return(currTemperature);
            }
            else
            {
                return((currTemperature - 32) * 5 / 9);
            }
        }
Exemple #14
0
        public double getCurrentWindChill()
        {
            WeatherAPI weatherAPI = new WeatherAPI(urlForCurrent);

            currTemperature = (double)weatherAPI.getTemperature();
            currWindChill   = (35.74 + .6215 * currTemperature - 35.75 * Math.Pow(getWindSpeed(), .16) + .4275 * currTemperature * Math.Pow(getWindSpeed(), .16));
            if (Weather.isImperial)
            {
                return(currWindChill);
            }
            else
            {
                return((currWindChill - 32) * 5 / 9);
            }
        }
Exemple #15
0
        public int getHighForecast(DateTime date)
        {
            WeatherAPI weatherAPI = new WeatherAPI(urlForForecast);
            string     dateOfChecking;

            dateOfChecking = date.ToString("yyyy-MM-dd");
            forecastHigh   = weatherAPI.getForecastTemperature(dateOfChecking, "max");
            if (Weather.isImperial)
            {
                return((int)forecastHigh);
            }
            else
            {
                return((int)((forecastHigh - 32) * (5.0 / 9.0)));
            }
        }
Exemple #16
0
        public double getPrecipForecast(DateTime date)
        {
            WeatherAPI weatherAPI = new WeatherAPI(urlForForecast);
            string     dateOfChecking;

            dateOfChecking = date.ToString("yyyy-MM-dd");
            forecastPrecip = weatherAPI.getForecastPrecipitation(dateOfChecking);

            if (Weather.isImperial)
            {
                return(forecastPrecip);
            }
            else
            {
                return(forecastPrecip * 25.4);
            }
        }
Exemple #17
0
        public int getWindDegree()
        {
            WeatherAPI weatherAPI = new WeatherAPI(urlForCurrent);

            return((int)weatherAPI.getWindDegree());
        }
Exemple #18
0
        public int getHumidity()
        {
            WeatherAPI weatherAPI = new WeatherAPI(urlForCurrent);

            return((int)weatherAPI.getHumidity());
        }
Exemple #19
0
        public string getWindDir()
        {
            WeatherAPI weatherAPI = new WeatherAPI(urlForCurrent);

            return(weatherAPI.getWindDir());
        }