示例#1
0
        internal void EnterElement(string name, IEnumerable <Property> properties)
        {
#if DEBUG_CLASS
            Console.WriteLine("Enter {0}", name);
            Console.WriteLine(this);
#endif
            LanguageElement cur = CurrentElement;
            CurrentElement = new LanguageElement(name, CurrentElement, properties);
            if (cur == null)
            {
                RootElement = CurrentElement;
            }
            else
            {
                cur.Add(CurrentElement);
            }
        }
示例#2
0
        internal void CopyFrom(LanguageData other)
        {
#if DEBUG_CLASS
            Console.WriteLine("Copy {0}", other);
            Console.WriteLine(this);
#endif
            if (other.RootElement != null)
            {
                LanguageElement cur = CurrentElement;
                other.RootElement.Parent = CurrentElement;
                CurrentElement           = other.RootElement;
                if (cur == null)
                {
                    RootElement = CurrentElement;
                }
                else
                {
                    cur.Add(CurrentElement);
                }
            }
        }
示例#3
0
 internal void WriteString(string text)
 {
     CurrentElement.Add(new LanguageText(text, CurrentElement));
 }