コード例 #1
0
        /// <summary>
        /// Adds the specified code.
        /// </summary>
        /// <param name="code">The code.</param>
        /// <returns></returns>
        public int Add(KeyCode code)
        {
            KeyDisabledItem item = new KeyDisabledItem();

            item.Code = code;
            return(_keyDisabledItemCollection.Add(item));
        }
コード例 #2
0
        /// <summary>
        /// Searches for the specified <see cref="KeyDisabledItem"/> and returns the zero-based index of the first occurrence within the entire collection.
        /// </summary>
        /// <param name="item">The item.</param>
        /// <returns></returns>
        public int IndexOf(KeyDisabledItem item)
        {
            if (item == null)
            {
                throw new ArgumentNullException("item");
            }

            return(_keyDisabledItemCollection.IndexOf(item));
        }
コード例 #3
0
        /// <summary>
        /// Determines whether contains the specified item.
        /// </summary>
        /// <param name="item">The item.</param>
        /// <returns>
        ///     <c>true</c> if contains the specified item; otherwise, <c>false</c>.
        /// </returns>
        public bool Contains(KeyDisabledItem item)
        {
            if (item == null)
            {
                return(false);
            }

            return(_keyDisabledItemCollection.Contains(item));
        }
コード例 #4
0
 /// <summary>
 /// Adds the specified item.
 /// </summary>
 /// <param name="item">The item.</param>
 /// <returns></returns>
 public int Add(KeyDisabledItem item)
 {
     return(_keyDisabledItemCollection.Add(item));
 }
コード例 #5
0
 /// <summary>
 /// Inserts at the specified index.
 /// </summary>
 /// <param name="index">The index.</param>
 /// <param name="item">The item.</param>
 public void Insert(int index, KeyDisabledItem item)
 {
     _keyDisabledItemCollection[index] = item;
 }
コード例 #6
0
 /// <summary>
 /// Removes the specified item.
 /// </summary>
 /// <param name="item">The item.</param>
 public void Remove(KeyDisabledItem item)
 {
     _keyDisabledItemCollection.Remove(item);
 }