コード例 #1
0
        /// <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);
        }
コード例 #2
0
		/// <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;
		}