/// <summary> /// Adds a <see cref="TextBoxAction"/> to this action model. /// </summary> /// <param name="key"></param> /// <param name="tooltip"></param> /// <param name="permissionSpec"></param> /// <returns></returns> public TextBoxAction AddTextBoxAction(object key, string tooltip, ISpecification permissionSpec) { Platform.CheckForNullReference(key, "key"); var actionId = MakeAnonymousId(); var action = new TextBoxAction(actionId, MakePath(actionId), _resolver) { Tooltip = tooltip }; if (permissionSpec != null) { action.SetPermissibility(permissionSpec); } this.InsertAction(action); _actions[key] = action; return(action); }
/// <summary> /// Adds a <see cref="TextBoxAction"/> to this action model. /// </summary> /// <param name="key"></param> /// <param name="tooltip"></param> /// <param name="permissionSpec"></param> /// <returns></returns> public TextBoxAction AddTextBoxAction(object key, [param : Localizable(true)] string tooltip, ISpecification permissionSpec) { Platform.CheckForNullReference(key, "key"); var actionId = MakeAnonymousId(); var action = new TextBoxAction(actionId, MakePath(actionId), _resolver) {Tooltip = tooltip}; if (permissionSpec != null) { action.SetPermissibility(permissionSpec); } this.InsertAction(action); _actions[key] = action; return action; }