Example #1
0
        public List <NavObject> GetFav(string group)
        {
            string section = "Fav";

            if (!String.IsNullOrEmpty(group))
            {
                section += "_" + group;
            }

            List <NavObject> ret = new List <NavObject>();

            if (Data.Sections[section] is null)
            {
                return(ret);
            }
            foreach (KeyData key in Data.Sections[section])
            {
                string[] keyVal = key.KeyName.Split('_');
                if (keyVal.Length == 2)
                {
                    int id = int.Parse(keyVal[1]);
                    ret.Add(new NavObject(keyVal[0], id,
                                          handler.GetObjName(id, NavObjects.GetObj(keyVal[0])),
                                          handler.GetVersion(id, NavObjects.GetObj(keyVal[0]))
                                          )
                            );
                }
            }
            return(ret);
        }