Exemplo n.º 1
0
        public static MenuObject Add(this MenuObject menu, string title, string tip = "")
        {
            var sub = new MenuObject(title, null, string.Empty, tip) { Parent = menu };

            menu.SubMenus.Add(sub);

            return sub;
        }
Exemplo n.º 2
0
        public static MenuObject AddLast(this MenuObject menu, string title, ApplicationTask task, string topic = "", string tip = "")
        {
            var sub = new MenuObject(title, task, topic, tip) { Parent = menu };

            menu.SubMenus.Add(sub);

            return menu.Parent;
        }
Exemplo n.º 3
0
        public static MenuObject Root()
        {
            var root = new MenuObject("Root");

            root.Parent = root;

            return root;
        }