예제 #1
0
 /// <summary>
 /// Add a base tag
 /// </summary>
 /// <param name="value">base tag to add</param>
 /// <returns>base tag added</returns>
 public Component Add(Component value)
 {
     List.Add(value as object);
     return value;
 }
예제 #2
0
 /// <summary>
 /// Add an array of component
 /// </summary>
 /// <param name="values">swf array</param>
 public void AddRange(Component[] values)
 {
     foreach(Component ip in values)
         Add(ip);
 }
예제 #3
0
        /// <summary>
        /// Convert collection to array
        /// </summary>
        /// <returns>component array</returns>
        public Component[] ToArray()
        {
            Component[] res = null;

            if (this.Count > 0)
            {
                res = new Component[this.Count];
                for (int i = 0; i < this.Count; i++)
                    res[i] = this[i];
            }
            return res;
        }
예제 #4
0
 /// <summary>
 /// Remove a component
 /// </summary>
 /// <param name="value"></param>
 public void Remove(Component value)
 {
     if (List.Contains(value))
         List.Remove(value as object);
 }
예제 #5
0
 /// <summary>
 /// Insert a component at
 /// </summary>
 /// <param name="index">index</param>
 /// <param name="value">swf</param>
 public void Insert(int index, Component value)
 {
     List.Insert(index, value as object);
 }
예제 #6
0
 /// <summary>
 /// Get index of a component
 /// </summary>
 /// <param name="value">component</param>
 /// <returns>swf index if is contain, -1 else.</returns>
 public int IndexOf(Component value)
 {
     return List.IndexOf(value);
 }
예제 #7
0
 /// <summary>
 /// Test if list contain a component
 /// </summary>
 /// <param name="value">component</param>
 /// <returns>contain result</returns>
 public bool Contains(Component value)
 {
     return List.Contains(value as object);
 }