public UpdatingToolStripMenuItem(string text, Image image, Func <bool> isActive, Func <bool> isChecked, Func <string> textAction, string message, object parameter) : base(text, image) { _isActive = isActive; _isChecked = isChecked; _text = textAction; _message = message; _parameter = parameter; var hk = Hotkeys.GetHotkeyForMessage(message, parameter); if (hk != null) { ShortcutKeyDisplayString = hk.Hotkey; } if (_isActive != null || _text != null || _isChecked != null) { Mediator.Subscribe(EditorMediator.UpdateMenu, this); } Notify(null, null); }