예제 #1
0
        private static void FillItems(DTObject itemData, List <UIMenuItem> items)
        {
            var name         = itemData.GetValue <string>("name", string.Empty);
            var icon         = itemData.GetValue <string>("icon", string.Empty);
            var iconFontSize = itemData.GetValue <string>("iconFontSize", string.Empty);
            var tags         = string.Join(",", itemData.GetList("tags").ToArray <string>());
            var code         = itemData.GetValue <string>("code", string.Empty);

            UIMenuItem item   = new UIMenuItem(name, icon, iconFontSize, tags, code);
            var        childs = itemData.GetList("childs", false);

            if (childs != null)
            {
                item.AddChilds(MapChildItems(childs));
            }

            items.Add(item);
        }
예제 #2
0
 public void AddChild(UIMenuItem item)
 {
     _childs.Add(item);
 }