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


C# MsgType.ToString方法代码示例

本文整理汇总了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 "";
        }
开发者ID:yalunwang,项目名称:family,代码行数:34,代码来源:LiveConfig.cs

示例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";
 }
开发者ID:Bfan23,项目名称:scaworldui,代码行数:26,代码来源:PageMaster.Master.cs

示例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
        }
开发者ID:benofben,项目名称:implier,代码行数:18,代码来源:FIXApplication.cs

示例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);
 }
开发者ID:JuRogn,项目名称:OA,代码行数:20,代码来源:EngineWcfGlobalFunction.svc.cs

示例5: Set

 public AjaxMessge Set(MsgType msgtype, string message)
 {
     code = msgtype.ToString().ToLower();
     text = message;
     return this;
 }
开发者ID:missxiaohuang,项目名称:Weekly,代码行数:6,代码来源:ZMessage.cs

示例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);
 }
开发者ID:zhang5171291,项目名称:TestCode,代码行数:13,代码来源:ConsoleUtility.cs

示例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;
        }
开发者ID:yalunwang,项目名称:family,代码行数:25,代码来源:LiveConfig.cs

示例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);
 }
开发者ID:SaintLoong,项目名称:TMFlow,代码行数:20,代码来源:EngineWcfGlobalFunction.svc.cs


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