Exemplo n.º 1
0
        public void procShowAlarmEventMessage(BVCU_Event_Source source)
        {
            string strEvent     = source.szID;
            string strEventType = BVCU.ConvertEventType2String(source.iEventType);

            if (strEvent.Length == 0)
            {
                strEvent = "null" + " " + strEventType + " " + source.szEventDesc;
            }
            else if (source.iEventType >= BVCU.BVCU_EVENT_TYPE.VIDEOLOST &&
                     source.iEventType <= BVCU.BVCU_EVENT_TYPE.OUTROUTE)
            {
                if (null != m_sdkOperator && null != m_sdkOperator.m_session)
                {
                    string puName = "";
                    Pu     pu     = m_sdkOperator.m_session.getPu(source.szID);
                    if (pu != null)
                    {
                        puName = pu.puName;
                    }

                    strEvent = puName + "(" + source.szID + ")" + " " + strEventType + " " + source.szEventDesc;
                    if (source.iEventType != BVCU.BVCU_EVENT_TYPE.PUONLINE &&
                        source.iEventType != BVCU.BVCU_EVENT_TYPE.PUOFFLINE)
                    {
                        if (source.bEnd == 1)
                        {
                            strEvent += " " + "结束";
                        }
                    }
                }
            }

            MessageBox.Show(strEvent, "WinformDemo");
        }