Esempio n. 1
0
 public static void PopulateMenuWithItems(this System.Windows.Forms.Menu menu, IEnumerable <BufermanMenuItem> menuItems)
 {
     foreach (var menuItem in menuItems)
     {
         menu.MenuItems.Add((menuItem as FormMenuItem).GetMenuItem());
     }
 }
Esempio n. 2
0
 private MenuItemCollectionWin CreateMenuItemCollectionWin()
 {
     System.Windows.Forms.Menu menu = (System.Windows.Forms.Menu)GetControlFactory().CreateMainMenu();
     System.Windows.Forms.Menu.MenuItemCollection menuItemCollection = new System.Windows.Forms.Menu.MenuItemCollection(menu);
     return(new MenuItemCollectionWin(menuItemCollection));
 }