Beispiel #1
0
        static public LocGroup ReadXML(LocDB db, XmlRead xml)
        {
            string sID = xml.GetValue(c_sID);
            string sTitle = xml.GetValue(c_sTitle);
            string sDescription = xml.GetValue(c_sDescription);
            string sTranslatorAudience = xml.GetValue(c_sTranslatorAudience);

            LocGroup group = new LocGroup(sID, sTitle);
            group.Description = sDescription;
            group.TranslatorAudience = (sTranslatorAudience == "true") ? true : false;

            while (xml.ReadNextLineUntilEndTag(c_sTag))
            {//yesu - stoped here
                if (xml.IsTag(LocItem.c_sTag))
                {
                    LocItem item = LocItem.ReadXML(xml);
                    group.AppendItem(item);
                }

                if (xml.IsTag(LocGroup.c_sTag))
                {
                    LocGroup sub = LocGroup.ReadXML(db, xml);
                    group._AppendGroup(sub);
                }
            }

            return group;
        }
Beispiel #2
0
        // Scaffolding -----------------------------------------------------------------------
        #region Constructor(LocDB)
        public Localizer(LocDB _DB)
        {
            m_DB = _DB;

            InitializeComponent();

            LocLanguage language = _DB.PrimaryLanguage;
            if (null != language)
                m_iLanguage = language.Index;
            else if (_DB.Languages.Length > 0)
                m_iLanguage = 0;
        }
Beispiel #3
0
 // Scaffolding -----------------------------------------------------------------------
 #region SMethod: void Initialize(string sPathApplicationFolder)
 static public void Initialize(string sPathApplicationFolder)
 {
     if (null == s_LocDB)
         s_LocDB = new LocDB(sPathApplicationFolder);
     Debug.Assert(null != s_LocDB);
 }