示例#1
0
文件: Menu.cs 项目: adbre/mono
 		protected Menu (MenuItem[] items)
		{
			menu_items = new MenuItemCollection (this);

			if (items != null)
				menu_items.AddRange (items);
		}
示例#2
0
        private void SortedAdd(MenuItemCollection items, Command cmd)
        {
            items.Add(cmd);
            var ordered = items.OrderBy(ButtonMenuItemComparer.Prepare).ToArray();

            items.Clear();
            items.AddRange(ordered);
        }
示例#3
0
        internal static MenuItemCollection ToMenuItemCollection(this IEnumerable <MenuItemViewModel> collection)
        {
            var result = new MenuItemCollection();

            result.AddRange(collection);

            return(result);
        }
示例#4
0
文件: Menu.cs 项目: nsivov/mono
        protected Menu(MenuItem[] items)
        {
            menu_items = new MenuItemCollection(this);

            if (items != null)
            {
                menu_items.AddRange(items);
            }
        }