using System;
using System.Collections.Generic;
using System.Text;
using iTripLog.cn.com.webxml ;
using iTripLog.cn.com.webxml.webservice; 
using System.IO;

namespace iTripLog.WeatherF
{
    class Common
    {

        public static string AppFilePath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
        private static string cityCode;

        public static string CityCode
        {
            get { return cityCode; }
            set { cityCode = value; }
        }

        
        public static WeatherWS  GetWebService()
        {
            WeatherWS ws = new WeatherWS();
            ws.Url = "http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx";
            return ws;
          
        }


        public static string[] GetWeatherByCityCode(string cityCode)
        {

            if (string.IsNullOrEmpty(cityCode))
                return null;

            return  GetWebService().getWeather(cityCode, ""); 


        
        }
 

    }
}
