예제 #1
0
        private string Get(string id, XmlDocument locale)
        {
            XmlItem xi = locale.Root;
            int     i;

            foreach (string category in categories)
            {
                i = xi.Find(category);
                if (i == -1)
                {
                    return(null);
                }
                xi = xi[i];
            }

            // find 'id'
            i = xi.Find(id);
            if (i == -1)
            {
                return(null);
            }
            xi = xi[i];

            return(xi.GetProp("Text"));
        }
예제 #2
0
        private string Get(string id, XmlDocument locale)
        {
            string[] categories = id.Split(new char[] { ',' });
            XmlItem  xi         = locale.Root;

            foreach (string category in categories)
            {
                int i = xi.Find(category);
                if (i == -1)
                {
                    return(id + " " + badResult);
                }
                xi = xi[i];
            }
            string result = xi.GetProp("Text");

            if (result == "")
            {
                result = id + " " + badResult;
            }
            return(result);
        }