本文整理汇总了C#中MsgType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# MsgType.ToString方法的具体用法?C# MsgType.ToString怎么用?C# MsgType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MsgType
的用法示例。
在下文中一共展示了MsgType.ToString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetMessage
public static string GetMessage(MsgType msgType, string messageID)
{
XmlNode nodex = null;
try
{
switch (lang)
{
case AppLanguage.CN:
if (docCN == null)
{
docCN = new XmlDocument();
docCN.Load(ApplicationConfiguration.AppRoot + @"\LanguageMessage\zh-CN.xml");
}
nodex = docCN.SelectSingleNode("//root/" + msgType.ToString() + "/" + messageID);
break;
case AppLanguage.EN:
if (docEN == null)
{
docEN = new XmlDocument();
docEN.Load(ApplicationConfiguration.AppRoot + @"\LanguageMessage\EN.xml");
}
nodex = docEN.SelectSingleNode("//root/" + msgType.ToString() + "/" + messageID);
break;
}
}
catch (Exception)
{
}
if (nodex != null)
return nodex.InnerText;
return "";
}
示例2: ShowMessage
public void ShowMessage(string msg, MsgType msgType)
{
string title;
switch (msgType)
{
case MsgType.Info:
title = "Bilgi";
break;
case MsgType.Warning:
title = "Uyarı";
break;
case MsgType.Error:
title = "Hata";
break;
default:
title = null;
break;
};
var script = String.Format(@"$.msgBox({{
title: '{2}',
content: '{0}',
type: '{1}',
buttons: [{{ value: 'Ok' }}],
}});", msg, msgType.ToString().ToLower(), title);
ClientScript += script + "\r\n";
}
示例3: toAdmin
public void toAdmin(Message message, SessionID sessionID)
{
// This is only for the TT dev environment. The production FIX Adapter does not require a password
MsgType msgType = new MsgType();
message.getHeader().getField(msgType);
TargetCompID targetCompID = new TargetCompID();
message.getHeader().getField(targetCompID);
if (msgType.ToString() == MsgType.Logon &&
(targetCompID.ToString() == "TTDEV9P" || targetCompID.ToString() == "TTDEV9O"))
{
const string password = "12345678";
RawData rawData = new RawData(password);
message.getHeader().setField(rawData);
}
// End TT Dev environment case
}
示例4: ApplicationEngineTrigger
/// <summary>
/// 发送待办(默认消息需要公司ID)
/// </summary>
/// <param name="UserAndForm">接收用户与FormID</param>
/// <param name="SystemCode">系统代号</param>
/// <param name="ModelCode">模块代号</param>
/// <param name="strCompanyID">公司ID</param>
/// <param name="strXml">业务数据XML</param>
/// <param name="msgType">消息类型</param>
public void ApplicationEngineTrigger(List<CustomUserMsg> UserAndForm, string SystemCode, string ModelCode, string strCompanyID, string strXml, MsgType msgType)
{
string ss = "";
foreach (CustomUserMsg list in UserAndForm)
{
ss += "FormID:" + list.FormID + "UserID:" + list.UserID;
}
Record.WriteLogFunction("ApplicationEngineTrigger()UserAndForm:" + ss + "SystemCode:" + SystemCode + "ModelCode:" + ModelCode + "strCompanyID:" + strCompanyID + "strXml:" + strXml + "msgType:" + msgType.ToString() + "");
EngineServicesBLL bll = new EngineServicesBLL();
bll.ApplicationEngineTrigger(UserAndForm, SystemCode, ModelCode, strCompanyID, strXml, msgType);
}
示例5: Set
public AjaxMessge Set(MsgType msgtype, string message)
{
code = msgtype.ToString().ToLower();
text = message;
return this;
}
示例6: OutPutMsg
/// <summary>
/// 输出消息
/// </summary>
/// <param name="msgType"></param>
/// <param name="msg"></param>
/// <param name="args"></param>
public static void OutPutMsg(MsgType msgType, string msg, params object[] args)
{
var msgTxt = string.Format(string.Concat("[", msgType.ToString(), "][", DateTime.Now, "]", msg), args);
Console.Out.WriteLine(msgTxt);
var logFile = string.Concat(msgType.ToString(), "_", DateTime.Now.ToString("yyyyMMddHHmm"), ".log");
WriteLog(logFile, msgTxt);
}
示例7: GetMessageList
public static Dictionary<string, string> GetMessageList(AppLanguage Language, MsgType msgType)
{
XmlNode nodex = null;
Dictionary<string, string> dic = new Dictionary<string, string>();
switch (Language)
{
case AppLanguage.CN:
if (docCN == null)
{
docCN = new XmlDocument();
docCN.Load(ApplicationConfiguration.AppRoot + @"\LanguageMessage\zh-CN.xml");
}
nodex = docCN.SelectSingleNode("//root/" + msgType.ToString());
break;
}
if (nodex != null && nodex.ChildNodes != null)
{
foreach (XmlNode node in nodex.ChildNodes)
{
dic.Add(node.Attributes["value"].Value, node.InnerText);
}
}
return dic;
}
示例8: ApplicationMsgTriggerCustom
/// <summary>
/// 发送待办(根据生成的待办提醒消息不能自定义-新增)
/// </summary>
/// <param name="UserAndForm">用户ID和FORMID</param>
/// <param name="SystemCode">系统代码</param>
/// <param name="ModelCode">模块代码</param>
/// <param name="strXml">将业务数据XM</param>
/// <param name="msgType">消息类型: Msg消息 ; Task代办任务; Cancel撤消 </param>
/// <param name="messageBody">用户自定义的消息实体,由业务系统确定,不再用数据库表的默认消息</param>
public void ApplicationMsgTriggerCustom(List<CustomUserMsg> UserAndForm, string SystemCode, string ModelCode, string strXml, MsgType msgType, string messageBody)
{
string ss = "";
foreach (CustomUserMsg list in UserAndForm)
{
ss += "FormID:" + list.FormID + "UserID:" + list.UserID;
}
Tracer.Debug("ApplicationMsgTriggerCustom()UserAndForm:" + ss + "SystemCode:" + SystemCode + "ModelCode:" + ModelCode + "strXml:" + strXml + "msgType:" + msgType.ToString() + "");
EngineServicesBLL bll = new EngineServicesBLL();
bll.ApplicationMsgTriggerCustom(UserAndForm, SystemCode, ModelCode, strXml, msgType, messageBody);
}