zoukankan      html  css  js  c++  java
  • 天气预报WebService的使用。

            /// <summary>
            /// 获取天气数据调用WebServer(地址:http://www.ayandy.com 命名空间:www.ayandy.com
            /// </summary>
            /// <param name="cityName">城市名称</param>
            /// <param name="day">日期(1:今天 2:明天 3:后天)</param>
            /// <returns>返回信息数组(1:城市 2:天气 3:温度 4:风向 5:日期 6:图标)</returns>
            public String[] getWeather(String cityName, int day)
            {
                com.ayandy.www.Service mWeatherWebService = new com.ayandy.www.Service();//构造服务
                String[] WeatherOfCity = new string[6];
                switch (day)
                {
                    case 1:

                        WeatherOfCity = mWeatherWebService.getWeatherbyCityName(cityName, com.ayandy.www.theDayFlagEnum.Today);//获取今天天气信息
                        break;
                    case 2:
                        WeatherOfCity = mWeatherWebService.getWeatherbyCityName(cityName, com.ayandy.www.theDayFlagEnum.Tomorrow);//获取明天天气信息
                        break;
                    case 3:
                        WeatherOfCity = mWeatherWebService.getWeatherbyCityName(cityName, com.ayandy.www.theDayFlagEnum.theDayafterTomorrow);//获取后天天气信息
                        break;
                }
                return WeatherOfCity;
            }

  • 相关阅读:
    Mac 快速进入mysql命令行
    Vuex 的使用 State Mutation Getter Action
    Vuex状态管理
    路由模块化
    Vue中路由的嵌套
    Vue路由编程式导航以及hash模式
    Vue动态路由 Get传值
    Vue中的路由 以及默认路由跳转
    Vue非父子组件传值
    父组件主动获取子组件的数据和方法 和 子组件主动获取父组件的数据和方法
  • 原文地址:https://www.cnblogs.com/mane/p/1984830.html
Copyright © 2011-2022 走看看