Пример #1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Make a clone of an existing menu item, including the extended properties. When using
		/// a menu extender, this should be used instead of MenuItem.CloneMenu().
		/// </summary>
		/// <param name="src"></param>
		/// <returns></returns>
		/// ------------------------------------------------------------------------------------
		public MenuItem CloneMenu(MenuItem src)
		{
			CheckDisposed();

			MainMenuMerge mainMenuMerge = new MainMenuMerge(this);
			return mainMenuMerge.CopyMenu(src, false);
		}
Пример #2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// <p>Merge the first and second main menu and return a copy of it.</p>
		/// <p>Side effect: This method changes the main menu of the form if one of the two
		/// passed in menus is set as main menu of the form!</p>
		/// </summary>
		/// <param name="firstMainMenu"></param>
		/// <param name="secondMainMenu"></param>
		/// <returns>The expanded first main menu</returns>
		/// ------------------------------------------------------------------------------------
		public MainMenu MergeMenus(MainMenu firstMainMenu, MainMenu secondMainMenu)
		{
			CheckDisposed();

			MainMenuMerge mainMenuMerge = new MainMenuMerge(this);
			mainMenuMerge.MergeMenu(firstMainMenu, secondMainMenu);
			SubscribeToPopup(firstMainMenu);
			return firstMainMenu;
		}