package cn.ccy.test_weather.utils;

import java.util.ArrayList;

import org.ksoap2.serialization.SoapObject;

import cn.ccy.test_weather.ui.Welcome;

public class ParseDetail {
	
	private static String Todaydate = "";
	private static String weatherCurrent = "";
	private static String date = "";
	private static String updateTime = "";
	private static String weatherToday ="";
	private static String TodayT ="";
	private static String TodayWindPower="";
	private static String city = "";
	private static String all = "";
	private static String weatherTomorrow = "";
	private static String tomorrowT = "";
	private static String tomorrowWindPower = "";
	private String tomorrowIcon1 = "";
	private String tomorrowIcon2 = "";
	private static String weatherThirdDay = "";
	private static String ThirdDayT = "";
	private static String ThirdDayWindPower = "";
	private String ThirdDayIcon1 = "";
	private String ThirdDayIcon2 = "";
	private static String weatherFourthDay = "";
	private static String FourthDayT = "";
	private static String FourthDayWindPower = "";
	private String FourthDayIcon1 = "";
	private String FourthDayIcon2 = "";
	
	ArrayList<String> list = new ArrayList<String>();
	
	public ArrayList<String> getList() {
		return list;
	}
	public ParseDetail(SoapObject detail) {

		
		if(detail != null){
			// 解析每天的天气情况
			city = detail.getProperty(1).toString();
			Welcome.editor.putString("City", city);
			Welcome.editor.commit();
			updateTime = detail.getProperty(3).toString();
			weatherCurrent = detail.getProperty(4).toString();
			date = detail.getProperty(7).toString();
			// 解析今天的天气情况
			Todaydate = date.split(" ")[0];
			weatherToday = date.split(" ")[1];
			TodayT = detail.getProperty(8).toString();
			TodayWindPower = detail.getProperty(9).toString();
			all = detail.getProperty(6).toString();
			weatherTomorrow = detail.getProperty(7).toString();
			tomorrowT = detail.getProperty(8).toString();
			tomorrowWindPower = detail.getProperty(9).toString();
			tomorrowIcon1 = detail.getProperty(10).toString();
			tomorrowIcon2 = detail.getProperty(11).toString();
			weatherThirdDay = detail.getProperty(12).toString();
			ThirdDayT = detail.getProperty(13).toString();
			ThirdDayWindPower = detail.getProperty(14).toString();
			ThirdDayIcon1 = detail.getProperty(15).toString();
			ThirdDayIcon2 = detail.getProperty(16).toString();
			weatherFourthDay = detail.getProperty(17).toString();
			FourthDayT = detail.getProperty(18).toString();
			FourthDayWindPower = detail.getProperty(19).toString();
			FourthDayIcon1 = detail.getProperty(20).toString();
			FourthDayIcon2 = detail.getProperty(21).toString();
			
			
			list.add(updateTime);
			list.add(weatherCurrent);
			list.add(Todaydate);
			list.add(weatherToday);
			list.add(TodayT);
			list.add(TodayWindPower);
			list.add(city);
			list.add(all);
			list.add(weatherTomorrow);
			list.add(tomorrowT);
			list.add(tomorrowWindPower);
			list.add(tomorrowIcon1);
			list.add(tomorrowIcon2);
			list.add(weatherThirdDay);
			list.add(ThirdDayT);
			list.add(ThirdDayWindPower);
			list.add(ThirdDayIcon1);
			list.add(ThirdDayIcon2);
			list.add(weatherFourthDay);
			list.add(FourthDayT);
			list.add(FourthDayWindPower);
			list.add(FourthDayIcon1);
			list.add(FourthDayIcon2);
			
		}

	}

}
