当前位置: 首页>>代码示例>>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;未经允许,请勿转载。