Exemple #1
0
        public AttitudeList(FileStrBuff file)
        {
            string    tok;
            ArrayList att = new ArrayList(5);

            while (!file.Eof() && (tok = file.GetNextToken()) != "{")
            {
                try
                {
                    att.Add(Enum.Parse(typeof(Attitude), tok, true));
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
            }

            if (file.Eof())
            {
                return;
            }

            file.Seek(-1);
            m_Strings = KeywordCollection.MakeList(file);
            if (att.Count > 0)
            {
                m_Atts = (Attitude[])att.ToArray(typeof(Attitude));
            }
            else
            {
                m_Strings = null;
            }
        }
Exemple #2
0
        public NotorietyList(FileStrBuff file)
        {
            string    tok;
            ArrayList noto = new ArrayList(5);

            while (!file.Eof() && (tok = file.GetNextToken()) != "{")
            {
                try
                {
                    noto.Add(Enum.Parse(typeof(NotoVal), tok, true));
                }
                catch
                {
                }
            }

            if (file.Eof())
            {
                return;
            }

            file.Seek(-1);
            m_Strings = KeywordCollection.MakeList(file);
            if (noto.Count > 0)
            {
                m_Notos = (NotoVal[])noto.ToArray(typeof(NotoVal));
            }
            else
            {
                m_Strings = null;
            }
        }