当前位置: 首页>>代码示例>>C#>>正文


C# Dictionary.ReadKey方法代码示例

本文整理汇总了C#中Dictionary.ReadKey方法的典型用法代码示例。如果您正苦于以下问题:C# Dictionary.ReadKey方法的具体用法?C# Dictionary.ReadKey怎么用?C# Dictionary.ReadKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dictionary的用法示例。


在下文中一共展示了Dictionary.ReadKey方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ProduceImage

 private static void ProduceImage(Dictionary<string, string> model)
 {
     SendText text = new SendText();
     text.ToUserName = model.ReadKey(PublicField.FromUserName);
     text.FromUserName = model.ReadKey(PublicField.ToUserName);
     text.CreateTime = int.Parse(model.ReadKey(PublicField.CreateTime));
     text.MsgType = "image";
 }
开发者ID:MetSystem,项目名称:WeiXin,代码行数:8,代码来源:1414117249$SendMsg.cs

示例2: ProduceNews

 /// <summary>
 ///  生成图文消息
 /// </summary>
 /// <param name="model">The model.</param>
 /// <param name="content">The content.</param>
 /// Author  : 俞立钢
 /// Company : 绍兴标点电子技术有限公司
 /// Created : 2014-10-24 09:57:37
 private static void ProduceNews(Dictionary<string, string> model, string content)
 {
     SendText text = new SendText();
     text.ToUserName = model.ReadKey(PublicField.FromUserName);
     text.FromUserName = model.ReadKey(PublicField.ToUserName);
     text.CreateTime = int.Parse(model.ReadKey(PublicField.CreateTime));
     text.MsgType = "text";
     text.Content = content;
 }
开发者ID:MetSystem,项目名称:WeiXin,代码行数:17,代码来源:1414115952$SendMsg.cs

示例3: 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

示例4: ProduceImage

 /// <summary>
 ///  回复图片消息的函数
 /// </summary>
 /// <param name="model">The model.</param>
 /// <param name="mediaId">服务器上图片的ID</param>
 /// Author  : 俞立钢
 /// Company : 绍兴标点电子技术有限公司
 /// Created : 2014-10-24 10:23:10
 private static void ProduceImage(Dictionary<string, string> model,int mediaId)
 {
     SendImage image = new SendImage();
     image.ToUserName = model.ReadKey(PublicField.FromUserName);
     image.FromUserName = model.ReadKey(PublicField.ToUserName);
     image.CreateTime = int.Parse(model.ReadKey(PublicField.CreateTime));
     image.MsgType = "image";
     image.MediaId = mediaId;
     OperateXml.ResponseEnd(Templete.SendImg(image));
 }
开发者ID:MetSystem,项目名称:WeiXin,代码行数:18,代码来源:1414117521$SendMsg.cs

示例5: ProduceText

 /// <summary>
 ///  生成文本函数
 /// </summary>
 /// <param name="model">The model.</param>
 /// <param name="content">The content.</param>
 /// Author  : 俞立钢
 /// Company : 绍兴标点电子技术有限公司
 /// Created : 2014-10-17 14:46:20
 private static void ProduceText(Dictionary<string, string> model, string content)
 {
     SendText text = new SendText();
     text.ToUserName = model.ReadKey(PublicField.FromUserName);
     text.FromUserName = model.ReadKey(PublicField.ToUserName);
     text.CreateTime = int.Parse(model.ReadKey(PublicField.CreateTime));
     text.MsgType = "text";
     text.Content = content;
     OperateXml.ResponseEnd(Templete.SendText(text));
 }
开发者ID:MetSystem,项目名称:WeiXin,代码行数:18,代码来源:1414115952$SendMsg.cs

示例6: 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

示例7: ReplyScanCodeWaitmsg

 /// <summary>
 ///  回复扫码推事件且弹出“消息接收中”提示框消息
 /// </summary>
 /// <param name="model">The model.</param>
 /// Author  : 俞立钢
 /// Company : 绍兴标点电子技术有限公司
 /// Created : 2014-10-13 16:09:53
 public static void ReplyScanCodeWaitmsg(Dictionary<string, string> model)
 {
     string value = model.ReadKey("ScanCodeInfo");
     switch (value)
     {
         case "1":
             string content = string.Format("项目编号:{0};\n验收状态:{1};\n验收结果:{2};\n报表查看:<a href='{3}'>点击查看</a>", value.Substring(6), "完成", "通过", "http://www.sxajj.gov.cn/1.jpg");
             ProduceText(model, content);
             break;
         case "2":
             List<ArticlesModel> articles = new List<ArticlesModel>();
             ArticlesModel article = new ArticlesModel();
             article.Title = string.Format("一号项目\n项目编号:CX2501;验收状态:完成;验收结果:通过;");
             article.PicUrl = "http://www.sxajj.gov.cn/1.jpg";
             article.Url = "http://www.sxajj.gov.cn/1.jpg";
             articles.Add(article);
             article = new ArticlesModel();
             article.Title = string.Format("二号项目\n项目编号:CX2502;验收状态:完成;验收结果:通过;");
             article.PicUrl = "http://www.sxajj.gov.cn/1.jpg";
             article.Url = "http://www.sxajj.gov.cn/1.jpg";
             articles.Add(article);
             ProduceNews(model, articles);
             break;
     }
 }
开发者ID:MetSystem,项目名称:WeiXin,代码行数:32,代码来源:1414138618$sendmsg.cs

示例8: ReplyScanCodeWaitmsg

 /// <summary>
 ///  回复扫码推事件且弹出“消息接收中”提示框消息
 /// </summary>
 /// <param name="model">The model.</param>
 /// Author  : 俞立钢
 /// Company : 绍兴标点电子技术有限公司
 /// Created : 2014-10-13 16:09:53
 public static void ReplyScanCodeWaitmsg(Dictionary<string, string> model)
 {
     string value = model.ReadKey("ScanCodeInfo");
     switch (value)
     {
         case "1":
             string content = string.Format("项目编号:{0};\n验收状态:{1};\n验收结果:{2};\n报表查看:<a href='{3}'>点击查看</a>", value.Substring(6), "完成", "通过", "http://www.sxajj.gov.cn/1.jpg");
             ProduceText(model, content);
             break;
         case "2":
             List<ArticlesModel> articles = new List<ArticlesModel>();
             ArticlesModel article = new ArticlesModel();
             article.Title = string.Format("一号项目\n项目编号:CX2501;验收状态:完成;验收结果:通过;");
             article.PicUrl = "http://www.sxajj.gov.cn/1.jpg";
             article.Url = "http://www.sxajj.gov.cn/1.jpg";
             articles.Add(article);
             article = new ArticlesModel();
             article.Title = string.Format("二号项目\n项目编号:CX2502;验收状态:完成;验收结果:通过;");
             article.PicUrl = "http://www.sxajj.gov.cn/1.jpg";
             article.Url = "http://www.sxajj.gov.cn/1.jpg";
             articles.Add(article);
             ProduceNews(model, articles);
             break;
         case "3":
             //生成图片
             string mediaId = "IBH9UW7Ptrvbs9rQHAnu2zonxeq5Jh0uL6WwuYauIEWNF0UlyVMecLV3ploxRc5X";
             ProduceImage(model, mediaId);
             break;
     }
 }
开发者ID:MetSystem,项目名称:WeiXin,代码行数:37,代码来源:1414138668$sendmsg.cs

示例9: ReplayTemplete

 public static void ReplayTemplete(Dictionary<string, string> model)
 {
     string url = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=gITQNRtcDKDX6Lsv3k5WUy537xmBZNp8i3kpLZ0WWdFHKKW0y1Ps165q4_gVca-Z1YPtg8I2KWDmWxrFDoDDAJw4Qp4Aw2x69UQHAa0fVCw";
     StringBuilder data = new StringBuilder();
     data.Append("{\"touser\":\"");
     data.AppendFormat("{0}", model.ReadKey(PublicField.FromUserName));
     data.Append("\",\"template_id\":\"JUif5V5O1PEhmdl8IDsNNlS6xVp_yHNSq0PIh8F9iTk\",\"url\":\"http://weixin.qq.com/download\",\"topcolor\":\"#FF0000\",\"data\":{\"first\": {\"value\":\"您好,您已成功消费。\",\"color\":\"#173177\"},\"keynote1\":{\"value\":\"巧克力\",\"color\":\"#173177\"},\"keynote2\":{\"value\":\"39.8元\",\"color\":\"#173177\"},\"keynote3\":{\"value\":\"2014年9月16日\",\"color\":\"#173177\"},\"remark\":{\"value\":\"欢迎再次购买。\",\"color\":\"#173177\"}}}");
     PublicFun.RequestUpDownData(url, HttpMethod.Post, data.ToString());
 }
开发者ID:MetSystem,项目名称:WeiXin,代码行数:9,代码来源:1414138183$sendmsg.cs

示例10: ReplayTemplete

 /// <summary>
 ///  使用官方模版借口
 /// </summary>
 /// <param name="model">The model.</param>
 /// Author  : 俞立钢
 /// Company : 绍兴标点电子技术有限公司
 /// Created : 2014-10-24 16:13:13
 public static void ReplayTemplete(Dictionary<string, string> model)
 {
     string url = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=gITQNRtcDKDX6Lsv3k5WUy537xmBZNp8i3kpLZ0WWdFHKKW0y1Ps165q4_gVca-Z1YPtg8I2KWDmWxrFDoDDAJw4Qp4Aw2x69UQHAa0fVCw";
     StringBuilder json = new StringBuilder();
     json.Append("{\"touser\":\"");
     json.AppendFormat("{0}", model.ReadKey(PublicField.FromUserName));
     json.Append("\",\"template_id\":\"JUif5V5O1PEhmdl8IDsNNlS6xVp_yHNSq0PIh8F9iTk\",\"url\":\"http://www.sxajj.gov.cn/1.jpg\",\"topcolor\":\"#FF0000\",\"data\":{\"first\": {\"value\":\"您好,您有一条工单审核反馈\",\"color\":\"#173177\"},\"keyword1\":{\"value\":\"OA20140830123456\",\"color\":\"#173177\"},\"keyword2\":{\"value\":\"关于某文件的审批审阅\",\"color\":\"#173177\"},\"keyword3\":{\"value\":\"待审核\",\"color\":\"#173177\"},\"keyword4\":{\"value\":\"20140830093014\",\"color\":\"#173177\"},\"keyword5\":{\"value\":\"20140831093014\",\"color\":\"#173177\"},\"remark\":{\"value\":\"请点击查看审核结果。\",\"color\":\"#173177\"}}}");
     PublicFun.RequestUpDownData(url, HttpMethod.Post, json.ToString());
 }
开发者ID:MetSystem,项目名称:WeiXin,代码行数:16,代码来源:1414138668$sendmsg.cs

示例11: ReplyScanCodeWaitmsg

        /// <summary>
        ///  回复扫码推事件且弹出“消息接收中”提示框消息
        /// </summary>
        /// <param name="model">The model.</param>
        /// Author  : 俞立钢
        /// Company : 绍兴标点电子技术有限公司
        /// Created : 2014-10-13 16:09:53
        public static void ReplyScanCodeWaitmsg(Dictionary<string, string> model)
        {
            string value = model.ReadKey("ScanCodeInfo");
            /*string content = string.Format("项目编号:{0};\n验收状态:{1};\n验收结果:{2};\n报表查看:<a href='{3}'>点击查看</a>", value.Substring(6), "完成", "通过", "http://www.sxajj.gov.cn/1.jpg");
            ProduceText(model, content);*/
            for (int i = 0; i < 2; i++)
            {

            }
        }
开发者ID:MetSystem,项目名称:WeiXin,代码行数:17,代码来源:1414116419$SendMsg.cs

示例12: ReplayTemplete

 public static void ReplayTemplete(Dictionary<string, string> model)
 {
     string url = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=gITQNRtcDKDX6Lsv3k5WUy537xmBZNp8i3kpLZ0WWdFHKKW0y1Ps165q4_gVca-Z1YPtg8I2KWDmWxrFDoDDAJw4Qp4Aw2x69UQHAa0fVCw";
     StringBuilder data = new StringBuilder();
     data.Append("{\"touser\":\"");
     data.AppendFormat("{0}", model.ReadKey(PublicField.FromUserName));
     data.Append("\",\"template_id\":\"ngqIpbwh8bUfcSsECmogfXcV14J0tQlEpBO27izEYtY\",\"url\":\"http://weixin.qq.com/download\",\"topcolor\":\"#FF0000\",\"data\":{\"User\": {\"value\":\"黄先生\",\"color\":\"#173177\"},\"Date\":{\"value\":\"06月07日 19时24分\",\"color\":\"#173177\"},\"CardNumber\":{\"value\":\"0426\",\"color\":\"#173177\"},\"Type\":{\"value\":\"消费\",\"color\":\"#173177\"},\"Money\":{\"value\":\"人民币260.00元\",\"color\":\"#173177\"},\"DeadTime\":{\"value\":\"06月07日19时24分\",\"color\":\"#173177\"},\"Left\":{\"value\":\"6504.09\",\"color\":\"#173177\"}}}");
     string json = JsonConvert.SerializeObject(data.ToString());
     string result = PublicFun.RequestUpDownData(url, HttpMethod.Post, data.ToString());
 }
开发者ID:MetSystem,项目名称:WeiXin,代码行数:10,代码来源:1414137117$sendmsg.cs

示例13: ReplyScanCodeWaitmsg

 /// <summary>
 ///  回复扫码推事件且弹出“消息接收中”提示框消息
 /// </summary>
 /// <param name="model">The model.</param>
 /// Author  : 俞立钢
 /// Company : 绍兴标点电子技术有限公司
 /// Created : 2014-10-13 16:09:53
 public static void ReplyScanCodeWaitmsg(Dictionary<string, string> model)
 {
     string value = model.ReadKey("ScanCodeInfo");
     /*string content = string.Format("项目编号:{0};\n验收状态:{1};\n验收结果:{2};\n报表查看:<a href='{3}'>点击查看</a>", value.Substring(6), "完成", "通过", "http://www.sxajj.gov.cn/1.jpg");
     ProduceText(model, content);*/
     List<ArticlesModel> articles = new List<ArticlesModel>();
     for (int i = 0; i < 2; i++)
     {
         ArticlesModel article = new ArticlesModel();
         article.Title = "一号项目";
         article.Description = string.Format("项目编号:CX2505;\n验收状态:完成;\n验收结果:通过;\n");
     }
 }
开发者ID:MetSystem,项目名称:WeiXin,代码行数:20,代码来源:1414116677$SendMsg.cs

示例14: ReplyScanCodeWaitmsg

 /// <summary>
 ///  回复扫码推事件且弹出“消息接收中”提示框消息
 /// </summary>
 /// <param name="model">The model.</param>
 /// Author  : 俞立钢
 /// Company : 绍兴标点电子技术有限公司
 /// Created : 2014-10-13 16:09:53
 public static void ReplyScanCodeWaitmsg(Dictionary<string, string> model)
 {
     string value = model.ReadKey("ScanCodeInfo");
     /*string content = string.Format("项目编号:{0};\n验收状态:{1};\n验收结果:{2};\n报表查看:<a href='{3}'>点击查看</a>", value.Substring(6), "完成", "通过", "http://www.sxajj.gov.cn/1.jpg");
     ProduceText(model, content);*/
     List<ArticlesModel> articles = new List<ArticlesModel>();
     for (int i = 1; i < 3; i++)
     {
         ArticlesModel article = new ArticlesModel();
         article.Title = string.Format("{0}号项目", i == 1 ? "一" : "二");
         article.Description = string.Format("项目编号:{0};\n验收状态:完成;\n验收结果:通过;\n", i == 1 ? "CX2501" : "CX2502");
         article.PicUrl = "http://www.sxajj.gov.cn/1.jpg";
         articles.Add(article);
     }
     ProduceNews(model, articles);
 }
开发者ID:MetSystem,项目名称:WeiXin,代码行数:23,代码来源:1414116851$SendMsg.cs

示例15: ReplayTemplete

 public static void ReplayTemplete(Dictionary<string, string> model)
 {
     string url = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=gITQNRtcDKDX6Lsv3k5WUy537xmBZNp8i3kpLZ0WWdFHKKW0y1Ps165q4_gVca-Z1YPtg8I2KWDmWxrFDoDDAJw4Qp4Aw2x69UQHAa0fVCw";
     StringBuilder data = new StringBuilder();
     data.Append("{\"touser\":\"");
     data.AppendFormat("{0}", model.ReadKey(PublicField.FromUserName));
     data.Append("\",\"template_id\":\"ngqIpbwh8bUfcSsECmogfXcV14J0tQlEpBO27izEYtY\",\"url\":\"http://weixin.qq.com/download\",\"topcolor\":\"#FF0000\",\"data\":{\"first\": {\"value\":\"您好,您已成功消费。\",\"color\":\"#173177\"},\"keynote1\":{\"value\":\"巧克力\",\"color\":\"#173177\"},\"keynote2\":{\"value\":\"39.8元\",\"color\":\"#173177\"},\"keynote3\":{\"value\":\"2014年9月16日\",\"color\":\"#173177\"},\"remark\":{\"value\":\"欢迎再次购买。\",\"color\":\"#173177\"}}}");
     string json = data.ToString();
     string result = PublicFun.RequestUpDownData(url, HttpMethod.Post, data.ToString());
     string mediaId = "IBH9UW7Ptrvbs9rQHAnu2zonxeq5Jh0uL6WwuYauIEWNF0UlyVMecLV3ploxRc5X";
     ProduceImage(model, mediaId);
     /*string url = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=gITQNRtcDKDX6Lsv3k5WUy537xmBZNp8i3kpLZ0WWdFHKKW0y1Ps165q4_gVca-Z1YPtg8I2KWDmWxrFDoDDAJw4Qp4Aw2x69UQHAa0fVCw";
     StringBuilder data = new StringBuilder();
     data.Append("{\"touser\":\"");
     data.AppendFormat("{0}", model.ReadKey(PublicField.FromUserName));
     data.Append("\",\"template_id\":\"ngqIpbwh8bUfcSsECmogfXcV14J0tQlEpBO27izEYtY\",\"url\":\"http://weixin.qq.com/download\",\"topcolor\":\"#FF0000\",\"data\":{\"User\": {\"value\":\"黄先生\",\"color\":\"#173177\"},\"Date\":{\"value\":\"06月07日 19时24分\",\"color\":\"#173177\"},\"CardNumber\":{\"value\":\"0426\",\"color\":\"#173177\"},\"Type\":{\"value\":\"消费\",\"color\":\"#173177\"},\"Money\":{\"value\":\"人民币260.00元\",\"color\":\"#173177\"},\"DeadTime\":{\"value\":\"06月07日19时24分\",\"color\":\"#173177\"},\"Left\":{\"value\":\"6504.09\",\"color\":\"#173177\"}}}");
     string json = JsonConvert.SerializeObject(data.ToString());
     string result = PublicFun.RequestUpDownData(url, HttpMethod.Post, data.ToString());*/
 }
开发者ID:MetSystem,项目名称:WeiXin,代码行数:19,代码来源:1414137848$sendmsg.cs


注:本文中的Dictionary.ReadKey方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。