本文整理匯總了C#中WeiXin.Model.SendMsg.SendText類的典型用法代碼示例。如果您正苦於以下問題:C# SendText類的具體用法?C# SendText怎麽用?C# SendText使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
SendText類屬於WeiXin.Model.SendMsg命名空間,在下文中一共展示了SendText類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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";
}
示例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;
}
示例3: 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));
}
示例4: SendText
/// <summary>
/// 回複文本消息
/// </summary>
/// <param name="model">The model.</param>
/// Author : 俞立鋼
/// Company : 紹興標點電子技術有限公司
/// Created : 2014-10-10 11:00:22
public static string SendText(SendText model)
{
return string.Format(@"<xml><ToUserName><![CDATA[{0}]]></ToUserName><FromUserName><![CDATA[{1}]]></FromUserName><CreateTime>{2}</CreateTime><MsgType><![CDATA[{3}]]></MsgType><Content><![CDATA[{4}]]></Content></xml>", model.ToUserName, model.FromUserName, model.CreateTime, model.MsgType, model.Content);
}