예제 #1
0
            internal ServiceAlertConfig(XmlDocument doc)
            {
                m_Doc      = doc;
                m_nVersion = (byte)BaseN.S64ToInt(m_Doc.DocumentElement.GetAttribute("V", string.Empty));

                byte   n   = 0;
                string str = m_Doc.DocumentElement.GetAttribute("E", string.Empty);

                if (str.Length == 0 || !byte.TryParse(str, out n))
                {
                    m_SAMode = AVMode.None;
                }
                else
                {
                    m_SAMode = (AVMode)n;
                }
            }
예제 #2
0
            internal RoutePatternConfig(XmlDocument doc)
            {
                m_Doc      = doc;
                m_nVersion = (byte)BaseN.S64ToInt(m_Doc.DocumentElement.GetAttribute("V", string.Empty));

                {
                    byte   n   = 0;
                    string str = m_Doc.DocumentElement.GetAttribute("F", string.Empty);
                    if (str.Length == 0 || !byte.TryParse(str, out n))
                    {
                        m_FareboxFields = FareboxFields.None;
                    }
                    else
                    {
                        m_FareboxFields = (FareboxFields)n;
                    }
                }
                {
                    byte   n   = 0;
                    string str = m_Doc.DocumentElement.GetAttribute("C", string.Empty);
                    if (str.Length == 0 || !byte.TryParse(str, out n))
                    {
                        m_ConnMode = AVMode.None;
                    }
                    else
                    {
                        m_ConnMode = (AVMode)n;
                    }
                }

                {
                    string str = m_Doc.DocumentElement.GetAttribute("R", string.Empty);
                    if (str.Length == 0)
                    {
                        m_nNSAReminderSec = 0;
                    }
                    else
                    {
                        m_nNSAReminderSec = (ushort)(60 * BaseN.S64ToInt(str));
                    }
                }
            }