Esempio n. 1
0
        internal InfoGroup Copy()
        {
            var g = new InfoGroup(Name, null);

            foreach (var i in this.groups)
            {
                g.groups.Add(i.Copy(g));
            }
            foreach (var i in this.items)
            {
                g.items.Add(i.Copy());
            }
            return(g);
        }
Esempio n. 2
0
        internal InfoGroup Copy(InfoGroup g)
        {
            var o = new InfoGroup(Name, g);

            foreach (var i in this.groups)
            {
                o.groups.Add(i.Copy(o));
            }
            foreach (var i in items)
            {
                o.items.Add(i.Copy());
            }
            return(o);
        }
Esempio n. 3
0
        /// <summary>
        /// Get path thought start of group to this item and item name.
        /// </summary>
        /// <returns><example>{group.name}/{group.name}/.../{item.name}</example></returns>
        public string GetGroupPath()
        {
            StringBuilder s   = new StringBuilder();
            InfoGroup     acG = this.Up;

            while (acG != null)
            {
                s.Insert(0, acG.Name);
                s.Insert(0, '\\');
                acG = acG.Up;
            }
            s.Remove(0, 1);
            s.Append('\\');
            s.Append(Name);
            return(s.ToString());
        }
Esempio n. 4
0
 public InfoGroup(string n, InfoGroup up)
 {
     Name = n;
     Up   = up;
 }