예제 #1
0
        public void Insert(int index, UserPref value)
        {
            if (value.DataType != UserPrefDataType.HiddenType)
            {
                this._visibleItemCount++;
            }
            if (value.Required)
            {
                this._showRequired = true;
            }

            List.Insert(index, value);
        }
예제 #2
0
        public int Add(UserPref value)
        {
            if (value.DataType != UserPrefDataType.HiddenType)
            {
                this._visibleItemCount++;
            }
            if (value.Required)
            {
                this._showRequired = true;
            }


            return(this.List.Add(value));
        }
예제 #3
0
        public void Remove(UserPref value)
        {
            if (value.DataType != UserPrefDataType.HiddenType)
            {
                this._visibleItemCount--;
            }
            List.Remove(value);

            this._showRequired = false;
            foreach (UserPref up in this)
            {
                if (up.Required)
                {
                    this._showRequired = true;
                    break;
                }
            }
        }
예제 #4
0
 /// <summary>
 /// Gets the index in the collection of the specified <see cref="UserPrefCollection">UserPrefCollection</see>, if it exists in the collection.
 /// </summary>
 /// <param name="value">The <see cref="UserPrefCollection">UserPrefCollection</see> to locate in the collection.</param>
 /// <returns>The index in the collection of the specified object, if found; otherwise, -1.</returns>
 public int IndexOf(UserPref value)
 {
     return(this.List.IndexOf(value));
 }
예제 #5
0
 /// <summary>
 /// Gets a value indicating whether the collection contains the specified <see cref="UserPrefCollection">UserPrefCollection</see>.
 /// </summary>
 /// <param name="value">The <see cref="UserPrefCollection">UserPrefCollection</see> to search for in the collection.</param>
 /// <returns><b>true</b> if the collection contains the specified object; otherwise, <b>false</b>.</returns>
 public bool Contains(UserPref value)
 {
     return(this.List.Contains(value));
 }