Exemplo n.º 1
0
 /// <summary>
 ///	<para> Removes a specific <see cref='XMLConfig'/> from the
 ///	<see cref='XMLConfigs'/> .</para>
 /// </summary>
 /// <param name='value'>The <see cref='XMLConfig'/> to remove from the <see cref='XMLConfigs'/> .</param>
 /// <returns><para>None.</para></returns>
 /// <exception cref='System.ArgumentException'><paramref name='value'/> is not found in the Collection. </exception>
 public void Remove(XMLConfig value)
 {
     List.Remove(value);
     if (OnItemRemove != null)
     {
         OnItemRemove(this, new XMLConfigArgs(value));
     }
     if (OnItemsChanged != null)
     {
         OnItemsChanged(value, EventArgs.Empty);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// <para>Inserts a <see cref='XMLConfig'/> into the <see cref='XMLConfigs'/> at the specified index.</para>
 /// </summary>
 /// <param name='index'>The zero-based index where <paramref name='value'/> should be inserted.</param>
 /// <param name=' value'>The <see cref='XMLConfig'/> to insert.</param>
 /// <returns><para>None.</para></returns>
 /// <seealso cref='XMLConfigs.Add'/>
 public void Insert(int index, XMLConfig value)
 {
     List.Insert(index, value);
     if (OnItemAdd != null)
     {
         OnItemAdd(this, new XMLConfigArgs(value));
     }
     if (OnItemsChanged != null)
     {
         OnItemsChanged(value, EventArgs.Empty);
     }
 }
Exemplo n.º 3
0
        /// <summary>
        ///	<para>Adds a <see cref='XMLConfig'/> with the specified value to the
        ///	<see cref='XMLConfig'/> .</para>
        /// </summary>
        /// <param name='value'>The <see cref='XMLConfig'/> to add.</param>
        /// <returns>
        ///	<para>The index at which the new element was inserted.</para>
        /// </returns>
        /// <seealso cref='XMLConfigs.AddRange'/>
        public int Add(XMLConfig value)
        {
            int ndx = List.Add(value);

            if (OnItemAdd != null)
            {
                OnItemAdd(this, new XMLConfigArgs(value));
            }
            if (OnItemsChanged != null)
            {
                OnItemsChanged(value, EventArgs.Empty);
            }
            return(ndx);
        }
Exemplo n.º 4
0
 /// Initializes with a XMLConfig.
 /// Data object.
 public XMLConfigArgs(XMLConfig t)
     : this()
 {
     this.t.Add(t);
 }
Exemplo n.º 5
0
 /// <summary>
 ///	<para>Returns the index of a <see cref='XMLConfig'/> in
 ///	   the <see cref='XMLConfig'/> .</para>
 /// </summary>
 /// <param name='value'>The <see cref='XMLConfig'/> to locate.</param>
 /// <returns>
 /// <para>The index of the <see cref='XMLConfig'/> of <paramref name='value'/> in the
 /// <see cref='XMLConfig'/>, if found; otherwise, -1.</para>
 /// </returns>
 /// <seealso cref='XMLConfigs.Contains'/>
 public int IndexOf(XMLConfig value)
 {
     return(List.IndexOf(value));
 }
Exemplo n.º 6
0
 /// <summary>
 /// <para>Gets a value indicating whether the
 ///	<see cref='XMLConfig'/> contains the specified <see cref='XMLConfig'/>.</para>
 /// </summary>
 /// <param name='value'>The <see cref='XMLConfig'/> to locate.</param>
 /// <returns>
 /// <para><see langword='true'/> if the <see cref='XMLConfig'/> is contained in the collection;
 ///   otherwise, <see langword='false'/>.</para>
 /// </returns>
 /// <seealso cref='XMLConfigs.IndexOf'/>
 public bool Contains(XMLConfig value)
 {
     return(List.Contains(value));
 }