using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.IO;
using System.Data;

namespace iTripLog.WeatherF
{
    static class startWeather
    {

        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [MTAThread]
       public static void Start()
        {
            DataSet ds = new DataSet();

           if (File.Exists(Common.AppFilePath + "\\CityList.xml"))
                ds.ReadXml(Common.AppFilePath + "\\CityList.xml");


            if ((ds != null) && (ds.Tables.Count > 0))
            {
                string cityCode = ds.Tables[0].Rows[0][0].ToString();

                if (string.IsNullOrEmpty(cityCode))
                    Application.Run(new FrmAddCity());

                Common.CityCode = cityCode;
                //Application.Run(new FrmDefaultCityWeather());
                FrmDefaultCityWeather x=new FrmDefaultCityWeather();
                x.Show();
            }
            else
                Application.Run(new FrmAddCity());
        }



    }
}