Пример #1
0
    public void ShowMsg(MSGType msg, bool bShow)
    {
        switch (msg)
        {
        case MSGType.eFoul_24:
            m_goFoulMsg.SetActive(bShow);
            break;

        case MSGType.eCheckBall:
            m_goCheckBallMsg.SetActive(bShow);
            break;
        }
    }
Пример #2
0
 public static void Add(string _value, MSGType _type = MSGType.eInfo)
 {
     if (TextLog != null)
     {
         lock (TextLog)
         {
             if (Log == null) return;
             DateTime now = DateTime.Now;
             if (CurCreateDate.Year != now.Year || CurCreateDate.Month != now.Month || CurCreateDate.Day != now.Day)
             {
                 PrepareLog();
             }
             string value = DateTime.Now + "\t" + (_type == MSGType.eEmail ? "WARNING\t" : "INFO\t") + _value;
             Log.WriteLine(value);
             Log.Flush(); // Запишем в файл на случай падаения
             if (TextLog.Length >= 1000000)
                 TextLog.Remove(TextLog.Length / 2, TextLog.Length - TextLog.Length / 2);
             TextLog.Insert(0, value + Environment.NewLine);
             if (frm != null && frm.Visible)
                 frm.LogText = TextLog.ToString();
             if (_type == MSGType.eEmail && !NoEmail)
             {
                 MailMessage msg = new MailMessage();
                 msg.From = new MailAddress("*****@*****.**");
                 msg.HeadersEncoding = Encoding.UTF8;
                 msg.BodyEncoding = Encoding.UTF8;
                 msg.Priority = MailPriority.High;
                 msg.To.Add(Config.LogEmail);
                 msg.Subject = "MMB Warning - " + DateTime.Now;
                 msg.Body = value;
                 lock (MSGStack)
                 {
                     MSGStack.Add(msg);
                 }
             }
         }
     }
 }
Пример #3
0
 public MSGInfo(MSGType mSGType, string mSG)
 {
     MSGType = mSGType;
     MSG     = mSG;
 }
    //mms발송 - SendMMS()에서호출
    private void SendSMS(string receiverPhoneNum, string senderPhoneNum, string msg, string datetime, MSGType msgType, int mms_seq)
    {
        string out_msg = string.Empty;

        //
        string proc_name = PROC_SEND_MOBILE_MSG_CUD;

        //
        List <SqlParameter> temp_param = new List <SqlParameter>();

        temp_param.Add(new SqlParameter("@" + XMLCommonUtil.GUBUN_KEY_STRING, xmlCommonUtil.GUBUN));
        temp_param.Add(new SqlParameter("@" + XMLCommonUtil.OPERATOR_IP_GUBUN, _httpContext.Request.ServerVariables["REMOTE_ADDR"]));
        temp_param.Add(new SqlParameter("@" + XMLCommonUtil.OPERATOR_KEY_GUBUN, xmlCommonUtil.QueryString[XMLCommonUtil.OPERATOR_KEY_GUBUN]));

        //*
        bool include_organization_key = XMLCommonUtil.INCLUDE_ORGANIZATION_KEY;

        if (include_organization_key)
        {
            temp_param.Add(new SqlParameter("@" + XMLCommonUtil.ORGANIZATION_KEY_GUBUN, xmlCommonUtil.QueryString[XMLCommonUtil.ORGANIZATION_KEY_GUBUN].ToString()));
        }
        //*/

        temp_param.Add(new SqlParameter("@" + TRAN_PHONE, receiverPhoneNum));
        temp_param.Add(new SqlParameter("@" + TRAN_CALLBACK, senderPhoneNum));

        if (!string.IsNullOrEmpty(datetime))
        {
            temp_param.Add(new SqlParameter("@" + TRAN_DATE, datetime));
        }

        temp_param.Add(new SqlParameter("@" + TRAN_TYPE, msgType));

        if (msgType == MSGType.MMS)
        {
            temp_param.Add(new SqlParameter("@" + TRAN_ETC4, mms_seq));
        }

        temp_param.Add(new SqlParameter("@" + TRAN_MSG, msg));

        /* 추가 파라메터 */
        for (int seq = 1; seq < 4; seq++)
        {
            string pKey = "tran_etc" + seq.ToString();
            if (xmlCommonUtil.QueryString[pKey] != null)
            {
                temp_param.Add(new SqlParameter("@" + pKey, xmlCommonUtil.QueryString[pKey].ToString()));
            }
        }

        SqlParameter[] sqlparams = temp_param.ToArray();

        xmlCommonUtil.WriteXML(proc_name, sqlparams, false);
    }