C#????????????-?????????Demo??
???????????? ???????[ 2014/6/12 11:07:05 ] ????????C# ??? net
1 //???
2 public string EventHandle(XmlDocument xmldoc)
3 {
4 string responseContent = "";
5 XmlNode Event = xmldoc.SelectSingleNode("/xml/Event");
6 XmlNode EventKey = xmldoc.SelectSingleNode("/xml/EventKey");
7 XmlNode ToUserName = xmldoc.SelectSingleNode("/xml/ToUserName");
8 XmlNode FromUserName = xmldoc.SelectSingleNode("/xml/FromUserName");
9 if (Event!=null)
10 {
11 //??????????
12 if (Event.InnerText.Equals("CLICK"))
13 {
14 if (EventKey.InnerText.Equals("click_one"))//click_one
15 {
16 responseContent = string.Format(ReplyType.Message_Text??
17 FromUserName.InnerText??
18 ToUserName.InnerText??
19 DateTime.Now.Ticks??
20 "????????click_one");
21 }
22 else if (EventKey.InnerText.Equals("click_two"))//click_two
23 {
24 responseContent = string.Format(ReplyType.Message_News_Main??
25 FromUserName.InnerText??
26 ToUserName.InnerText??
27 DateTime.Now.Ticks??
28 "2"??
29 string.Format(ReplyType.Message_News_Item??"??????"??""??
30 "http://www.soso.com/orderPlace.jpg"??
31 "http://www.soso.com/")+
32 string.Format(ReplyType.Message_News_Item?? "????????"?? ""??
33 "http://www.soso.com/orderManage.jpg"??
34 "http://www.soso.com/"));
35 }
36 else if (EventKey.InnerText.Equals("click_three"))//click_three
37 {
38 responseContent = string.Format(ReplyType.Message_News_Main??
39 FromUserName.InnerText??
40 ToUserName.InnerText??
41 DateTime.Now.Ticks??
42 "1"??
43 string.Format(ReplyType.Message_News_Item?? "????"?? "??"??
44 "http://www.soso.com/jieshao.jpg"??
45 "http://www.soso.com/"));
46 }
47 }
48 }
49 return responseContent;
50 }
51 /// <summary>
52 /// ??????????
53 /// </summary>
54 public static string Message_News_Main
55 {
56 get
57 {
58 return @"<xml>
59 <ToUserName><![CDATA[{0}]]></ToUserName>
60 <FromUserName><![CDATA[{1}]]></FromUserName>
61 <CreateTime>{2}</CreateTime>
62 <MsgType><![CDATA[news]]></MsgType>
63 <ArticleCount>{3}</ArticleCount>
64 <Articles>
65 {4}
66 </Articles>
67 </xml> ";
68 }
69 }
70 /// <summary>
71 /// ????????
72 /// </summary>
73 public static string Message_News_Item
74 {
75 get
76 {
77 return @"<item>
78 <Title><![CDATA[{0}]]></Title>
79 <Description><![CDATA[{1}]]></Description>
80 <PicUrl><![CDATA[{2}]]></PicUrl>
81 <Url><![CDATA[{3}]]></Url>
82 </item>";
83 }
84 }
|
??????????????XmlNode Event = xmldoc.SelectSingleNode("/xml/Event")??????????????????XmlNode EventKey = xmldoc.SelectSingleNode("/xml/EventKey")??????????????????????????click??key?????key????????ж??????????????
?????????????????????????????????????Щ?????????????????????????????????????????????<a href="http://www.baidu.com">???????</a>?????????
???????Demo????
????????????http://yun.baidu.com/s/1mgI9nde
???????
????????????????????????????????????????????Щ????????????????????????????á??????????????Щ???????????ú???????????????????????????????????????????
?????????????????????????????????????Щ?????????????????????????????????????????????<a href="http://www.baidu.com">???????</a>?????????
???????Demo????
????????????http://yun.baidu.com/s/1mgI9nde
???????
????????????????????????????????????????????Щ????????????????????????????á??????????????Щ???????????ú???????????????????????????????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
???????C#?е?StringC# Socket???????????????????C#?????????????????????????C#???????C#????????????Log4net??????δ????C#?????????????C#?????????????????C#???????????????C#????????????????C#7 ?е?Tuple??????C#??TypeScript - GeneratorC# ?????????細??????????C#?е???н???C#??MySQL?????????μ??Ч?????д??C#????C++??dll???C#??VS2010????е??????