⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smartphone手机上查看qq天气预报.mht

📁 smartphone:自己搜集的关于smartphone入门开发资料
💻 MHT
📖 第 1 页 / 共 2 页
字号:
From: <由 Windows Internet Explorer 7 保存>
Subject: =?gb2312?B?U21hcnRQaG9uZcrWu/rJz7Lpv7RRUczsxvjUpLGo?=
Date: Fri, 29 Feb 2008 10:39:46 +0800
MIME-Version: 1.0
Content-Type: multipart/related;
	type="text/html";
	boundary="----=_NextPart_000_0108_01C87ABF.671A53E0"
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138

This is a multi-part message in MIME format.

------=_NextPart_000_0108_01C87ABF.671A53E0
Content-Type: text/html;
	charset="gb2312"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://edu.pingjiang.com/wap/02/50183.htm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" =
"http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML><HEAD><TITLE>SmartPhone=CA=D6=BB=FA=C9=CF=B2=E9=BF=B4QQ=CC=EC=C6=F8=
=D4=A4=B1=A8</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb2312">
<META content=3D"MSHTML 6.00.6000.16544" name=3DGENERATOR>
<META =
content=3DSmartPhone=CA=D6=BB=FA=C9=CF=B2=E9=BF=B4QQ=CC=EC=C6=F8=D4=A4=B1=
=A8 name=3Dkeywords>
<META =
content=3DASP=BD=CC=B3=CC,wap=BD=CC=B3=CC,PHP=BD=CC=B3=CC,PHOTOSHOP=BD=CC=
=B3=CC,=CD=F8=D2=B3=C9=E8=BC=C6=BD=CC=B3=CC,AUTOCAD=BD=CC=B3=CC,=CA=FD=BE=
=DD=BF=E2=BD=CC=B3=CC,=CA=D3=C6=B5=BD=CC=B3=CC=20
name=3Ddescription><LINK =
href=3D"http://edu.pingjiang.com/images/content.css"=20
type=3Dtext/css rel=3Dstylesheet></HEAD>
<BODY>
<SCRIPT language=3DjavaScript src=3D"http://edu.pingjiang.com/js/top.js" =

type=3Dtext/javascript></SCRIPT>

<DIV class=3Dnav>
<DIV style=3D"WIDTH: 1000px">
<DIV style=3D"PADDING-LEFT: 20px; TEXT-ALIGN: =
left">=B5=B1=C7=B0=CE=BB=D6=C3=A3=BA<A=20
href=3D"http://www.pingjiang.com/">=CA=D7=D2=B3</A> =A1=FA <A=20
href=3D"http://edu.pingjiang.com/">=BF=C6=BD=CC=C6=B5=B5=C0</A> =A1=FA =
<A=20
href=3D"http://edu.pingjiang.com/164_1.htm">=CA=D6=BB=FA=B1=E0=B3=CC</A> =
=A1=FA =
SmartPhone=CA=D6=BB=FA=C9=CF=B2=E9=BF=B4QQ=CC=EC=C6=F8=D4=A4=B1=A8=20
</DIV></DIV></DIV>
<DIV class=3Dfull>
<DIV class=3Dkwidth>
<DIV class=3Dmright>
<DIV class=3Dartcontent>
<DIV=20
style=3D"FLOAT: left; MARGIN-BOTTOM: 15px; PADDING-BOTTOM: 10px; WIDTH: =
100%; BORDER-BOTTOM: #ddd 1px solid; TEXT-ALIGN: =
center"><STRONG>SmartPhone=CA=D6=BB=FA=C9=CF=B2=E9=BF=B4QQ=CC=EC=C6=F8=D4=
=A4=B1=A8</STRONG><BR><FONT=20
style=3D"FONT-SIZE: =
12px">=C0=B4=D4=B4:=BB=A5=C1=AA=CD=F8=A1=A1=CA=B1=BC=E4: =
2006-04-11</FONT> </DIV><FONT id=3Dfont_word=20
style=3D"FONT-SIZE: 12px; FONT-FAMILY: =CB=CE=CC=E5, Verdana, Arial, =
Helvetica, =
sans-serif">=D6=C7=C4=DC=CA=D6=BB=FA=D3=A6=D3=C3=B3=CC=D0=F2=BF=AA=B7=A2=CA=
=C7=C8=ED=BC=FE=BF=AA=B7=A2=B5=C4=D2=BB=B8=F6=D0=C2=B5=C4=C8=C8=B5=E3=A3=AC=
=B5=AB=C8=E7=BA=CE=B2=C5=C4=DC=BF=E7=C8=EB=D5=E2=B5=C0=C3=C5=E9=B9=C4=D8=A3=
=BF=BD=F1=CC=EC=CE=D2=CD=A8=B9=FD=CE=AA=D7=D4=BC=BA=B5=C4=B6=E0=C6=D5=B4=EF=
565=CA=D6=BB=FA=CC=ED=BC=D3=D2=BB=B8=F6=CC=EC=C6=F8=D4=A4=B1=A8=B3=CC=D0=F2=
=C0=B4=CF=F2=B4=F3=BC=D2=BD=B2=BD=E2=D2=BB=CF=C2=A1=A3=CE=D2=C3=C7=B6=BC=D6=
=AA=B5=C0QQ=D3=D0=D2=BB=B8=F6=C3=E2=B7=D1=CC=E1=B9=A9=B8=F8Blog=D2=FD=D3=C3=
=B5=C4=CC=EC=C6=F8=D4=A4=B1=A8=B7=FE=CE=F1=CD=F8=D6=B7http://appnews.qq.c=
om/cgi-bin/news_qq_search?city=3D=C9=CF=BA=A3=A3=A8=C9=CF=BA=A3=CA=C7=CE=D2=
=D7=D4=BC=BA=CB=F9=D4=DA=B3=C7=CA=D0=A3=AC=C8=E7=B9=FB=CF=EB=BF=B4=D7=D4=BC=
=BA=B5=C4=B3=C7=CA=D0=A3=AC=D4=DA=E4=AF=C0=C0=C6=F7=D6=D0=B8=C4=B3=C9=B3=C7=
=CA=D0=C3=FB=B3=C6=BC=B4=BF=C9=A3=A9=A3=AC=CF=D6=D4=DA=CE=D2=CA=B9=D3=C3Q=
Q=CC=E1=B9=A9=B5=C4=D5=E2=B8=F6=B7=FE=CE=F1=A3=AC=BD=AB=C6=E4=B0=FC=D7=B0=
=B2=BF=CA=F0=CE=AA=D2=BB=B8=F6Web=B7=FE=CE=F1=A3=AC=B2=A2=B1=E0=D0=B4=B3=CC=
=D0=F2=CA=B9=B5=C3=CE=D2=B5=C4=B6=E0=C6=D5=B4=EF565=D6=C7=C4=DC=CA=D6=BB=FA=
=C4=DC=CA=B9=D3=C3=D5=E2=B8=F6Web=B7=FE=CE=F1=A1=A3=20

<P>=A1=A1=A1=A1=C9=E8=B1=B8=D2=AA=C7=F3=A3=BA</P>
<P>=A1=A1=A1=A1PC=BF=AA=B7=A2=BB=B7=BE=B3=A3=BAWindows XP =
SP2=A3=ACVisual Studio 2003.NET,.NET Framework 1.1 SP1</P>
<P>=A1=A1=A1=A1=B2=D9=D7=F7=CF=B5=CD=B3=A3=BAWindows Mobile(TM) =
2003=B5=DA=B6=FE=B0=E6=A3=AC=B0=E6=B1=BE4.21.1088(Build 14235.2.0.0)</P>
<P>=A1=A1=A1=A1=D6=C7=C4=DC=CA=D6=BB=FA=A3=BA=B6=E0=C6=D5=B4=EF565</P>
<P>=A1=A1=A1=A1=D2=BB=A1=A2=BB=B7=BE=B3=B0=B2=D7=B0</P>
<P>=A1=A1=A1=A1=CA=D7=CF=C8=CE=D2=C3=C7=B1=D8=D0=EB=B0=B2=D7=B0.NET =
Mobile=CB=F9=D0=E8=D2=AA=B5=C4=BF=AA=B7=A2=BB=B7=BE=B3=A3=AC=B1=D8=D0=EB=B0=
=B2=D7=B0=B5=C4=C8=ED=BC=FE(=C8=E7=CF=C2=C8=ED=BC=FE=B6=BC=CA=C7=CE=A2=C8=
=ED=CC=E1=B9=A9=C3=E2=B7=D1=CF=C2=D4=D8=BA=CD=CA=B9=D3=C3=B5=C4)</P>
<P>=A1=A1=A1=A11=A1=A2Microsoft ActiveSync 3.7.1 </P>
<P>=A1=A1=A1=A1=CF=C2=D4=D8=CD=F8=D6=B7=A3=BAhttp://www.microsoft.com/win=
dowsmobile/downloads/activesync37.mspx=A3=AC=C0=EF=C3=E6=D3=D0=D6=D0=CE=C4=
=B0=E6=B1=BE=A3=AC=BB=F2=D5=DF=A3=AC=D4=DA=CA=D6=BB=FA=B8=BD=B4=F8=B5=C4=CE=
=A2=C8=ED=B9=E2=C5=CC=C0=EF=C3=E6=D3=D0=B0=B2=D7=B0=B3=CC=D0=F2=A3=BB=D7=EE=
=D0=C2=B0=E6=B1=BEMicrosoft=20
ActiveSync =
3.8=B3=F6=C0=B4=C1=CB=A3=AC=BF=C9=D2=D4=B5=BD=D5=AA=D2=AA=B5=C4=D2=B3=C3=E6=
=D6=D0=C8=A5=D5=D2=C1=B4=BD=D3=CF=C2=D4=D8=A3=AC=B5=AB=D5=E2=B8=F6=B3=CC=D0=
=F2=CE=D2=BB=B9=CA=C7=D3=C3=B5=C4=C0=CF=B0=E6=B1=BE=A1=A3</P>
<P>=A1=A1=A1=A1=D7=F7=D3=C3=A3=BA=CD=AC=B2=BD=CA=D6=BB=FA=BA=CDPC=BB=FA=CA=
=FD=BE=DD=B5=C4=B3=CC=D0=F2</P>
<P>=A1=A1=A1=A12=A1=A2Microsoft SMARTPHONE 2003 SDK.msi</P>
<P>=A1=A1=A1=A1=CF=C2=D4=D8=CD=F8=D6=B7=A3=BA</P>
<P>=A1=A1=A1=A1http://download.microsoft.com/download/e/3/1/e310bb99-2f33=
-4d79-bb8a-41d9cb3c79b4/Microsoft=20
SMARTPHONE 2003 SDK.msi</P>
<P>=A1=A1=A1=A13=A1=A2MobileAppDevToolkit2004.exe</P>
<P>=A1=A1=A1=A1=CF=C2=D4=D8=B5=D8=D6=B7=A3=BAhttp://download.microsoft.co=
m/download/b/2/5/b25742c0-daa3-4a8c-988d-a947a35e0a68/MobileAppDevToolkit=
2004.exe</P>
<P>=A1=A1=A1=A1=B6=FE=A1=A2=C9=E8=BC=C6=B2=A2=B2=BF=CA=F0WebService</P>
<P>=A1=A1=A1=A11=A1=A2=BD=A8=C1=A2=D2=BB=B8=F6=C3=FB=CE=AAWeatherService=B5=
=C4WebService=A3=AC=B2=A2=BD=ABQQ=B5=C4=CC=EC=C6=F8=B7=FE=CE=F1=D7=AA=CE=AA=
XML=20
WebService=B7=FE=CE=F1=A3=AC=B2=BF=CA=F0=D4=DA=D2=BB=CC=A8=BE=DF=D3=D0=B9=
=CC=B6=A8IP=B5=C4=B7=FE=CE=F1=C6=F7=C9=CF=A1=A3</P>
<P>=A1=A1=A1=A12=A1=A2=D0=C2=BD=A8=D2=BB=B8=F6WeatherDataSet.XSD=A3=AC=B4=
=E6=B4=A2=CE=D2=C3=C7=B5=C4=CC=EC=C6=F8=D0=C5=CF=A2</P>
<P>=A3=BC?xml version=3D"1.0" encoding=3D"utf-8" =
?=A3=BE<BR>=A3=BCxs:schema id=3D"WeatherDataSet"=20
targetNamespace=3D"Ezhi.Services.WeatherService"=20
elementFormDefault=3D"qualified"<BR>=A1=A1=A1=A1attributeFormDefault=3D"q=
ualified"=20
xmlns=3D"Ezhi.Services.WeatherService"=20
=A1=A1=A1=A1=A1=A1xmlns:mstns=3D"Ezhi.Services.WeatherService"<BR>=A1=A1=A1=
=A1xmlns:xs=3D"http://www.w3.org/2001/XMLSchema"=20
xmlns:msdata=3D"urn:schemas-microsoft-com:xml-msdata"=A3=BE</P>
<P>=A3=BCxs:element name=3D"WeatherDataSet"=20
msdata:IsDataSet=3D"true"=A3=BE<BR>=A3=BCxs:complexType=A3=BE<BR>=A1=A1=A3=
=BCxs:choice=20
maxOccurs=3D"unbounded"=A3=BE<BR>=A1=A1=A1=A1=A3=BCxs:element=20
name=3D"WeatherDS"=A3=BE<BR>=A1=A1=A1=A1=A1=A1=A3=BCxs:complexType=A3=BE<=
BR>=A1=A1=A1=A1=A1=A1=A1=A1=A3=BCxs:sequence=A3=BE<BR>=A1=A1=A1=A1=A1=A1=A1=
=A1=A1=A1=A3=BCxs:element=20
name=3D"CityName" type=3D"xs:string" minOccurs=3D"0" =
/=A3=BE<BR>=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A3=BCxs:element=20
name=3D"Date1" type=3D"xs:string" minOccurs=3D"0" =
/=A3=BE<BR>=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A3=BCxs:element=20
name=3D"Weather1" type=3D"xs:string" minOccurs=3D"0" =
/=A3=BE<BR>=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A3=BCxs:element=20
name=3D"Temp1" type=3D"xs:string" minOccurs=3D"0" =
/=A3=BE<BR>=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A3=BCxs:element=20
name=3D"WindPower1" type=3D"xs:string" minOccurs=3D"0" =
/=A3=BE<BR>=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A3=BCxs:element=20
name=3D"Date2" type=3D"xs:string" minOccurs=3D"0" =
/=A3=BE<BR>=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A3=BCxs:element=20
name=3D"Weather2" type=3D"xs:string" minOccurs=3D"0" =
/=A3=BE<BR>=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A3=BCxs:element=20
name=3D"Temp2" type=3D"xs:string" minOccurs=3D"0" =
/=A3=BE<BR>=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A3=BCxs:element=20
name=3D"WindPower2" type=3D"xs:string" minOccurs=3D"0"=20
/=A3=BE<BR>=A1=A1=A1=A1=A1=A1=A1=A1=A3=BC/xs:sequence=A3=BE<BR>=A1=A1=A1=A1=
=A1=A1=A3=BC/xs:complexType=A3=BE<BR>=A1=A1=A1=A1=A3=BC/xs:element=A3=BE<=
BR>=A1=A1=A3=BC/xs:choice=A3=BE<BR>=A3=BC/xs:complexType=A3=BE<BR>=A3=BC/=
xs:element=A3=BE<BR>=A3=BC/xs:schema=A3=BE=20
</P>
<P>=A1=A1=A1=A13=A1=A2WeatherService=B5=C4=D4=B4=B4=FA=C2=EB=C8=E7=CF=C2<=
/P>
<P>#region Using directives</P>
<P>using System;<BR>using System.Collections;<BR>using=20
System.ComponentModel;<BR>using System.Data;<BR>using=20
System.Diagnostics;<BR>using System.Web;<BR>using =
System.Web.Services;<BR>using=20
System.IO;<BR>using System.Net;<BR>using System.Text;</P>
<P>#endregion</P>
<P>namespace WeatherService<BR>{<BR>=A1=A1/// =
=A3=BCsummary=A3=BE<BR>=A1=A1/// Service1=20
=B5=C4=D5=AA=D2=AA=CB=B5=C3=F7=A1=A3<BR>=A1=A1/// =
=A3=BC/summary=A3=BE</P>
<P>=A1=A1[WebService(Description=3D"WeatherService=20
=CC=EC=C6=F8Service",Namespace=3D"WeatherService")]</P>
<P>=A1=A1public class Weather : =
System.Web.Services.WebService<BR>=A1=A1{<BR>=A1=A1=A1=A1#region=20
Variable<BR>=A1=A1=A1=A1private string =
tommorow;<BR>=A1=A1=A1=A1#endregion </P>
<P>=A1=A1=A1=A1#region =B9=B9=D4=EC=BA=AF=CA=FD</P>
<P>public Weather()<BR>{<BR>=A1=A1InitializeComponent();</P>
<P>=A1=A1if(DateTime.Today.AddDays(1).Month.ToString().Length =3D=3D=20
1)<BR>=A1=A1{<BR>=A1=A1=A1=A1tommorow=3D =
"0"+DateTime.Today.AddDays(1).Month.ToString()+"=D4=C2" +=20
<BR>=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1DateTime.Today.AddDays(1).Day.ToS=
tring()+"=C8=D5";<BR>=A1=A1}<BR>=A1=A1else<BR>=A1=A1{<BR>=A1=A1=A1=A1tomm=
orow=3D=20
DateTime.Today.AddDays(1).Month.ToString()+"=D4=C2" +=20
<BR>=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1DateTime.Today.AddDays(1).Day.ToString(=
)+"=C8=D5";<BR>=A1=A1}<BR>}</P>
<P>#endregion </P>
<P>=A1=A1=A1=A1#region =
=D7=E9=BC=FE=C9=E8=BC=C6=C6=F7=C9=FA=B3=C9=B5=C4=B4=FA=C2=EB</P>
<P>//Web =B7=FE=CE=F1=C9=E8=BC=C6=C6=F7=CB=F9=B1=D8=D0=E8=B5=C4</P>
<P>private IContainer components =3D null;</P>
<P>/// =A3=BCsummary=A3=BE<BR>/// =
=C9=E8=BC=C6=C6=F7=D6=A7=B3=D6=CB=F9=D0=E8=B5=C4=B7=BD=B7=A8 - =
=B2=BB=D2=AA=CA=B9=D3=C3=B4=FA=C2=EB=B1=E0=BC=AD=C6=F7=D0=DE=B8=C4<BR>///=
 =B4=CB=B7=BD=B7=A8=B5=C4=C4=DA=C8=DD=A1=A3<BR>///=20
=A3=BC/summary=A3=BE</P>
<P>private void InitializeComponent()<BR>{}</P>
<P>/// =A3=BCsummary=A3=BE<BR>/// =
=C7=E5=C0=ED=CB=F9=D3=D0=D5=FD=D4=DA=CA=B9=D3=C3=B5=C4=D7=CA=D4=B4=A1=A3<=
BR>/// =A3=BC/summary=A3=BE</P>
<P>protected override void Dispose( bool disposing =
)<BR>{<BR>=A1=A1if(disposing=20
&amp;&amp; components !=3D=20
null)<BR>=A1=A1{<BR>=A1=A1=A1=A1components.Dispose();<BR>=A1=A1}<BR>=A1=A1=
base.Dispose(disposing);=20
<BR>}</P>
<P>#endregion</P>
<P>#region [OK] GetWeatherDataSet =CC=EC=C6=F8=D4=A4=B1=A8</P>
<P>[WebMethod(Description=3D"=CC=EC=C6=F8=D4=A4=B1=A8")]</P>
<P>public DataSet GetWeatherDataSet(string =
cityName)<BR>{<BR>=A1=A1string=20
url=3D@"http://appnews.qq.com/cgi-bin/news_qq_search";<BR>=A1=A1string=20
weatherData=3D"";</P>
<P>=A1=A1try<BR>=A1=A1{<BR>=A1=A1=A1=A1weatherData =3D =
GetPage(url,cityName).Replace("=20
","").Trim();<BR>=A1=A1}<BR>=A1=A1catch(Exception)<BR>=A1=A1{<BR>=A1=A1=A1=
=A1throw new=20
Exception("=B6=D4=B2=BB=C6=F0=A3=AC=C3=BB=D3=D0=D5=E2=B8=F6=B3=C7=CA=D0=B5=
=C4=CC=EC=C6=F8=D0=C5=CF=A2=A3=A1");<BR>=A1=A1}</P>
<P>=A1=A1//System.Diagnostics.Trace.WriteLine( tommorow=20
);<BR>=A1=A1//System.Diagnostics.Trace.WriteLine( weatherData );</P>
<P>=A1=A1WeatherDataSet weatherDs =3D new=20
WeatherDataSet();<BR>=A1=A1weatherDs.WeatherDS.AddWeatherDSRow(GetWeather=
Row(ref=20
weatherDs,weatherData,cityName) );<BR>=A1=A1return weatherDs;<BR>}</P>
<P>private WeatherDataSet.WeatherDSRow GetWeatherRow(ref WeatherDataSet=20
weatherDs,string weatherData,string=20
cityName)<BR>{<BR>=A1=A1WeatherDataSet.WeatherDSRow weatherRow =3D=20
weatherDs.WeatherDS.NewWeatherDSRow();<BR>=A1=A1weatherRow.CityName =3D=20
weatherData.Substring(weatherData.IndexOf("=A1=F1")+1,cityName.Length);</=
P>
<P>=A1=A1weatherRow.Date1 =3D DateTime.Now.ToLongDateString();</P>
<P>=A1=A1weatherRow.Weather1 =3D=20
weatherData.Substring(weatherData.IndexOf("=CC=EC=C6=F8")+"=CC=EC=C6=F8".=
Length,weatherData.IndexOf("=C6=F8=CE=C2")-(weatherData.IndexOf("=CC=EC=C6=
=F8")+"=CC=EC=C6=F8".Length));</P>
<P>=A1=A1weatherRow.Temp1 =3D=20
weatherData.Substring(weatherData.IndexOf("=C6=F8=CE=C2")+"=C6=F8=CE=C2".=
Length,weatherData.IndexOf("=B7=E7=C1=A6")-(weatherData.IndexOf("=C6=F8=CE=
=C2")+"=C6=F8=CE=C2".Length)).Replace("=A1=E6-","=A1=E6/");</P>
<P>=A1=A1weatherRow.WindPower1 =3D=20
weatherData.Substring(weatherData.IndexOf("=B7=E7=C1=A6")+"=B7=E7=C1=A6".=
Length,weatherData.IndexOf(tommorow)-(weatherData.IndexOf("=B7=E7=C1=A6")=
+"=B7=E7=C1=A6".Length));</P>
<P>=A1=A1weatherRow.Date2 =3D =
DateTime.Today.AddDays(1).ToLongDateString();</P>
<P>=A1=A1weatherRow.Weather2 =3D=20
weatherData.Substring(weatherData.LastIndexOf("=CC=EC=C6=F8")+"=CC=EC=C6=F8=
".Length,weatherData.LastIndexOf("=C6=F8=CE=C2")-(weatherData.LastIndexOf=
("=CC=EC=C6=F8")+"=CC=EC=C6=F8".Length));</P>
<P>=A1=A1weatherRow.Temp2 =3D=20
weatherData.Substring(weatherData.LastIndexOf("=C6=F8=CE=C2")+"=C6=F8=CE=C2=
".Length,weatherData.LastIndexOf("=B7=E7=C1=A6")-(weatherData.LastIndexOf=
("=C6=F8=CE=C2")+"=C6=F8=CE=C2".Length)).Replace("=A1=E6-","=A1=E6/");</P=
>
<P>=A1=A1weatherRow.WindPower2 =3D=20
weatherData.Substring(weatherData.LastIndexOf("=B7=E7=C1=A6")+"=B7=E7=C1=A6=
".Length);</P>
<P>=A1=A1return weatherRow;<BR>}</P>
<P>#endregion</P>
<P>#region GetPageString =
=BB=F1=C8=A1QQ=B5=C4=CC=EC=C6=F8=B7=FE=CE=F1</P>
<P>//private string xx=3D"";</P>
<P>[WebMethod(Description=3D"=CC=EC=C6=F8=D4=A4=B1=A8")]</P>
<P>public string GetPageString(string cityName) <BR>{<BR>=A1=A1string=20
url=3D@"http://appnews.qq.com/cgi-bin/news_qq_search";<BR>=A1=A1return=20
GetPage(url,cityName);<BR>}</P>
<P>private static string GetPage(string url,string cityName)=20
<BR>{<BR>=A1=A1HttpWebResponse res =3D null;<BR>=A1=A1string strResult =
=3D "";<BR>=A1=A1try=20
<BR>=A1=A1{<BR>=A1=A1=A1=A1string postData =3D "city=3D" +=20
HttpUtility.UrlEncode(cityName,System.Text.Encoding.GetEncoding("GB2312")=
);<BR>=A1=A1=A1=A1HttpWebRequest=20
req =3D =
(HttpWebRequest)WebRequest.Create(url);<BR>=A1=A1=A1=A1req.Method =3D=20
"POST";<BR>=A1=A1=A1=A1req.KeepAlive =3D =
true;<BR>=A1=A1=A1=A1req.ContentType =3D=20
"application/x-www-form-urlencoded";<BR>=A1=A1=A1=A1StringBuilder =
UrlEncoded =3D new=20
StringBuilder();<BR>=A1=A1=A1=A1byte[] SomeBytes =3D=20
Encoding.ASCII.GetBytes(postData);<BR>=A1=A1=A1=A1req.ContentLength =3D=20
SomeBytes.Length;<BR>=A1=A1=A1=A1Stream newStream =3D=20
req.GetRequestStream();<BR>=A1=A1=A1=A1newStream.Write(SomeBytes, 0,=20
SomeBytes.Length);<BR>=A1=A1=A1=A1newStream.Close();</P>
<P>=A1=A1=A1=A1//=BB=F1=B5=C3=C1=F7=C4=DA=C8=DD </P>
<P>=A1=A1=A1=A1res =3D =
(HttpWebResponse)req.GetResponse();<BR>=A1=A1=A1=A1System.IO.Stream=20
s=3Dres.GetResponseStream();<BR>=A1=A1=A1=A1StreamReader reader =3D new=20
StreamReader(s,System.Text.Encoding.Default);<BR>=A1=A1=A1=A1strResult=3D=
reader.ReadToEnd();<BR>=A1=A1}=20
<BR>=A1=A1catch(Exception e) <BR>=A1=A1{<BR>=A1=A1=A1=A1strResult =3D =
e.ToString();<BR>=A1=A1} <BR>=A1=A1finally=20
<BR>=A1=A1{<BR>=A1=A1=A1=A1if ( res !=3D null ) =
<BR>=A1=A1=A1=A1{<BR>=A1=A1=A1=A1=A1=A1res.Close();<BR>=A1=A1=A1=A1}<BR>=A1=
=A1}</P>
<P>=A1=A1strResult=3DstrResult.Remove(0,strResult.IndexOf("=A1=F1"));</P>=

<P>=A1=A1if( cityName !=3D "=B1=B1=BE=A9"=20
)<BR>=A1=A1{<BR>=A1=A1=A1=A1strResult=3DstrResult.Remove(strResult.IndexO=
f("=B1=B1=BE=A9"),strResult.Length-strResult.IndexOf("=B1=B1=BE=A9"));<BR=
>=A1=A1}<BR>=A1=A1else<BR>=A1=A1{<BR>=A1=A1=A1=A1strResult=3DstrResult.Re=
move(strResult.LastIndexOf("=B1=B1=BE=A9"),strResult.Length-strResult.Las=
tIndexOf("=B1=B1=BE=A9"));<BR>=A1=A1}</P>
<P>=A1=A1strResult=3DstrResult.Trim();<BR>=A1=A1while(strResult.IndexOf(@=
"=A3=BC") !=3D=20
-1)<BR>=A1=A1{<BR>=A1=A1=A1=A1strResult=3DstrResult.Remove(strResult.Inde=
xOf(@"=A3=BC"),strResult.IndexOf(@"=A3=BE")-strResult.IndexOf(@"=A3=BC")+=
1);<BR>=A1=A1}</P>
<P>=A1=A1while(strResult.IndexOf(@" ") !=3D=20
-1)<BR>=A1=A1{<BR>=A1=A1=A1=A1strResult=3DstrResult.Replace(" =
","");<BR>=A1=A1}</P>
<P>=A1=A1string x =3D Encoding.UTF8.GetString(new =
Byte[]{10});<BR>=A1=A1string y =3D=20

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -