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; }
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; }
public static MenuObject Root() { var root = new MenuObject("Root"); root.Parent = root; return root; }