/// <summary> /// Generates an <see cref="UMLMenuItem"/> instance with item text and /// action initialized. /// </summary> /// <param name="text">The item text to be displayed on menu item.</param> /// <param name="action">The action to be triggered when item clicked.</param> public UMLMenuItem(string text, UMLAction action) : base(text) { ActionInit(action); ThemeInit(); IconInit(); }
/// <summary> /// Initializes the <see cref="UMLAction"/> held by this menu item. /// </summary> /// <param name="action"> /// The corresponding <see cref="UMLAction"/> this item should hold. /// </param> private void ActionInit(UMLAction action) { Debug.Assert(action != null); _action = action; Click += OnMenuItemClick; }
/// <summary> /// Generates an <see cref="UMLMenuItem"/> instance with action initialized. /// </summary> /// <param name="action">The action to be triggered when item clicked.</param> public UMLMenuItem(UMLAction action) { ActionInit(action); ThemeInit(); IconInit(); }
/// <summary> /// Generates a <see cref="ExitMenuItem"/> instance with item text and /// action initialized. /// </summary> /// <seealso cref="UMLMenuItem(string, UMLAction)"/> internal ExitMenuItem(string text, UMLAction action) : base(text, action) { }
/// <summary> /// Generates a <see cref="GroupMenuItem"/> instance with item text and /// action initialized. /// </summary> /// <seealso cref="UMLMenuItem(string, UMLAction)"/> internal GroupMenuItem(string text, UMLAction action) : base(text, action) { }
/// <summary> /// Generates a <see cref="RenameMenuItem"/> instance with item text and /// action initialized. /// </summary> /// <seealso cref="UMLMenuItem(string, UMLAction)"/> public RenameMenuItem(string text, UMLAction action) : base(text, action) { }
/// <summary> /// Generates a <see cref="DeleteMenuItem"/> instance with item text and /// action initialized. /// </summary> /// <seealso cref="UMLMenuItem(string, UMLAction)"/> internal DeleteMenuItem(string text, UMLAction action) : base(text, action) { }