Пример #1
0
        // Operations (type-safe ICloneable)

        /// <summary>
        /// Clones the list
        /// </summary>
        /// <returns></returns>
        public KeyboardActionList Clone()
        {
            KeyboardActionList tc = new KeyboardActionList();

            tc.AddRange(this);
            tc.Capacity  = this.m_array.Length;
            tc.m_version = this.m_version;
            return(tc);
        }
Пример #2
0
        /// <summary>
        /// Add the content of another KeyboardActionList to this list
        /// </summary>
        /// <param name="collection">List to copy items from</param>
        public void AddRange(KeyboardActionList collection)
        {
            // for (int i=0; i < collection.Count; ++i) Add(collection[i]);

            ++m_version;

            Capacity += collection.Count;
            Array.Copy(collection.m_array, 0, this.m_array, m_count, collection.m_count);
            m_count += collection.Count;
        }
Пример #3
0
            // Construction

            public Enumerator(KeyboardActionList tc)
            {
                m_collection = tc;
                m_index      = -1;
                m_version    = tc.m_version;
            }
Пример #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="collection"></param>
 public KeyboardActionList(KeyboardActionList collection)
 {
     AddRange(collection);
 }
Пример #5
0
			// Construction

			public Enumerator(KeyboardActionList tc)
			{
				m_collection = tc;
				m_index = -1;
				m_version = tc.m_version;
			}
Пример #6
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="collection"></param>
		public KeyboardActionList(KeyboardActionList collection)
		{
			AddRange(collection);
		}
Пример #7
0
		/// <summary>
		/// Add the content of another KeyboardActionList to this list
		/// </summary>
		/// <param name="collection">List to copy items from</param>
		public void AddRange(KeyboardActionList collection)
		{
			// for (int i=0; i < collection.Count; ++i) Add(collection[i]);

			++m_version;

			Capacity += collection.Count;
			Array.Copy(collection.m_array, 0, this.m_array, m_count, collection.m_count);
			m_count += collection.Count;
		}
Пример #8
0
		// Operations (type-safe ICloneable)

		/// <summary>
		/// Clones the list
		/// </summary>
		/// <returns></returns>
		public KeyboardActionList Clone()
		{
			KeyboardActionList tc = new KeyboardActionList();
			tc.AddRange(this);
			tc.Capacity = this.m_array.Length;
			tc.m_version = this.m_version;
			return tc;
		}