當前位置: 首頁>>代碼示例>>C#>>正文


C# SendMsg.SendPicTxt類代碼示例

本文整理匯總了C#中WeiXin.Model.SendMsg.SendPicTxt的典型用法代碼示例。如果您正苦於以下問題:C# SendPicTxt類的具體用法?C# SendPicTxt怎麽用?C# SendPicTxt使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SendPicTxt類屬於WeiXin.Model.SendMsg命名空間,在下文中一共展示了SendPicTxt類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ProduceNews

 /// <summary>
 ///  生成圖文消息
 /// </summary>
 /// <param name="model">The model.</param>
 /// <param name="articles">The content.</param>
 /// Author  : 俞立鋼
 /// Company : 紹興標點電子技術有限公司
 /// Created : 2014-10-24 09:57:37
 private static void ProduceNews(Dictionary<string, string> model, List<ArticlesModel> articles)
 {
     SendPicTxt text = new SendPicTxt();
     text.ToUserName = model.ReadKey(PublicField.FromUserName);
     text.FromUserName = model.ReadKey(PublicField.ToUserName);
     text.CreateTime = int.Parse(model.ReadKey(PublicField.CreateTime));
     text.MsgType = "news";
     text.ArticleCount = articles.Count.ToString("D");
 }
開發者ID:MetSystem,項目名稱:WeiXin,代碼行數:17,代碼來源:1414116111$SendMsg.cs

示例2: ProduceNews

 /// <summary>
 ///  回複圖文消息的函數
 /// </summary>
 /// <param name="model">The model.</param>
 /// <param name="articles">The content.</param>
 /// Author  : 俞立鋼
 /// Company : 紹興標點電子技術有限公司
 /// Created : 2014-10-24 09:57:37
 private static void ProduceNews(Dictionary<string, string> model, List<ArticlesModel> articles)
 {
     SendPicTxt news = new SendPicTxt();
     news.ToUserName = model.ReadKey(PublicField.FromUserName);
     news.FromUserName = model.ReadKey(PublicField.ToUserName);
     news.CreateTime = int.Parse(model.ReadKey(PublicField.CreateTime));
     news.MsgType = "news";
     news.ArticleCount = articles.Count.ToString("D");
     news.Articles = articles;
     OperateXml.ResponseEnd(Templete.SendNews(news));
 }
開發者ID:MetSystem,項目名稱:WeiXin,代碼行數:19,代碼來源:1414117415$SendMsg.cs

示例3: SendNews

 /// <summary>
 ///  回複圖文信息
 /// </summary>
 /// <param name="model">The model.</param>
 /// Author  : 俞立鋼
 /// Company : 紹興標點電子技術有限公司
 /// Created : 2014-10-10 11:19:47
 public static string SendNews(SendPicTxt model)
 {
     string item = "";
     foreach (ArticlesModel articles in model.Articles)
     {
         item += string.Format(@"
                             <item>
                             <Title><![CDATA[{0}]]></Title>
                             <Description><![CDATA[{1}]]></Description>
                             <PicUrl><![CDATA[{2}]]></PicUrl>
                             <Url><![CDATA[{3}]]></Url>
                             </item>", articles.Title, articles.Description, articles.PicUrl, articles.Url);
     }
     return string.Format(@"<xml>
                             <ToUserName><![CDATA[{0}]]></ToUserName>
                             <FromUserName><![CDATA[{1}]]></FromUserName>
                             <CreateTime>{2}</CreateTime>
                             <MsgType><![CDATA[{3}]]></MsgType>
                             <ArticleCount>{4}</ArticleCount>
                             <Articles>{5}</Articles>
                            </xml> ", model.ToUserName, model.FromUserName, model.CreateTime, model.MsgType, model.ArticleCount, item);
 }
開發者ID:MetSystem,項目名稱:WeiXin,代碼行數:29,代碼來源:1414117470$Templete.cs


注:本文中的WeiXin.Model.SendMsg.SendPicTxt類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。