Ejemplo n.º 1
0
		/// <summary>
		/// Copies the elements of the specified <see cref="ThemeInfo">ThemeInfo</see> array to the end of the collection.
		/// </summary>
		/// <param name="value">An array of type <see cref="ThemeInfo">ThemeInfo</see> containing the Components to add to the collection.</param>
		public void AddRange(ThemeInfo[] value) 
		{
			for (int i = 0;	(i < value.Length); i = (i + 1)) 
			{
				this.Add(value[i]);
			}
		}
Ejemplo n.º 2
0
		private static ThemeInfo GetThemeEntity(IDataReader reader)
		{
			ThemeInfo ti = new ThemeInfo();
			ti.ThemeId = TypeConverter.ObjectToInt(reader["themeid"], 0);
			ti.Directory = reader["directory"].ToString();
			ti.Name = reader["name"].ToString();
			ti.Type = TypeConverter.ObjectToInt(reader["type"], 0);
			ti.Author = reader["author"].ToString();
			ti.CreateDate = reader["createdate"].ToString();
			ti.CopyRight = reader["copyright"].ToString();
			return ti;
		}
Ejemplo n.º 3
0
 /// <summary>
 /// Gets a value indicating whether the collection contains the specified <see cref="ThemeInfoCollection">ThemeInfoCollection</see>.
 /// </summary>
 /// <param name="value">The <see cref="ThemeInfoCollection">ThemeInfoCollection</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(ThemeInfo value)
 {
     return(this.List.Contains(value));
 }
Ejemplo n.º 4
0
 public int Add(ThemeInfo value)
 {
     return(this.List.Add(value));
 }
Ejemplo n.º 5
0
 public void Remove(ThemeInfo value)
 {
     List.Remove(value);
 }
Ejemplo n.º 6
0
 public void Insert(int index, ThemeInfo value)
 {
     List.Insert(index, value);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Gets the index in the collection of the specified <see cref="ThemeInfoCollection">ThemeInfoCollection</see>, if it exists in the collection.
 /// </summary>
 /// <param name="value">The <see cref="ThemeInfoCollection">ThemeInfoCollection</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(ThemeInfo value)
 {
     return(this.List.IndexOf(value));
 }
Ejemplo n.º 8
0
        /// <summary>
        /// 获取空间主题信息
        /// </summary>
        /// <param name="dt"></param>
        /// <returns></returns>
		public static ThemeInfo[] GetSpaceThemeInfoArray(DataTable dt)
		{
			if(dt == null || dt.Rows.Count == 0)
				return null;
			ThemeInfo[] spacethemeinfoarray = new ThemeInfo[dt.Rows.Count];
			for(int i = 0 ; i < dt.Rows.Count ; i++)
			{
				spacethemeinfoarray[i] = new ThemeInfo();
				spacethemeinfoarray[i].ThemeId = TypeConverter.ObjectToInt(dt.Rows[i]["themeid"]);
				spacethemeinfoarray[i].Directory = dt.Rows[i]["datareader"].ToString();
				spacethemeinfoarray[i].Name = dt.Rows[i]["name"].ToString();
				spacethemeinfoarray[i].Type = TypeConverter.ObjectToInt(dt.Rows[i]["type"]);
				spacethemeinfoarray[i].Author = dt.Rows[i]["author"].ToString();
				spacethemeinfoarray[i].CreateDate = dt.Rows[i]["createdate"].ToString();
				spacethemeinfoarray[i].CopyRight = dt.Rows[i]["copyright"].ToString();
			}

			dt.Dispose();
			return spacethemeinfoarray;
		}
Ejemplo n.º 9
0
		/// <summary>
		/// 通过数据读取获得主题内容
		/// </summary>
		/// <param name="datareader">数据读取</param>
		/// <returns></returns>
		public static ThemeInfo GetSpaceThemeInfo(IDataReader idatareader)
		{
			if (idatareader == null)
				return null;

			if (idatareader.Read())
			{
				ThemeInfo spacethemeinfo = new ThemeInfo();
				spacethemeinfo.ThemeId = TypeConverter.ObjectToInt(idatareader["themeid"]);
				spacethemeinfo.Directory = idatareader["directory"].ToString();
				spacethemeinfo.Name = idatareader["name"].ToString();
				spacethemeinfo.Type = TypeConverter.ObjectToInt(idatareader["type"]);
				spacethemeinfo.Author = idatareader["author"].ToString();
				spacethemeinfo.CreateDate = idatareader["createdate"].ToString();
				spacethemeinfo.CopyRight = idatareader["copyright"].ToString();

				idatareader.Close();
				return spacethemeinfo;
			}
			else
			{
                idatareader.Close();
				return null;
			}
		}
Ejemplo n.º 10
0
		/// <summary>
		/// Copies the collection Components to a one-dimensional <see cref="T:System.Array">Array</see> instance beginning at the specified index.
		/// </summary>
		/// <param name="array">The one-dimensional <see cref="T:System.Array">Array</see> that is the destination of the values copied from the collection.</param>
		/// <param name="index">The index of the array at which to begin inserting.</param>
		public void CopyTo(ThemeInfo[] array, int index) 
		{
			this.List.CopyTo(array, index);
		}
Ejemplo n.º 11
0
		/// <summary>
		/// Gets a value indicating whether the collection contains the specified <see cref="ThemeInfoCollection">ThemeInfoCollection</see>.
		/// </summary>
		/// <param name="value">The <see cref="ThemeInfoCollection">ThemeInfoCollection</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(ThemeInfo value) 
		{
			return this.List.Contains(value);
		}
Ejemplo n.º 12
0
		public int Add(ThemeInfo value) 
		{
			return this.List.Add(value);
		}
Ejemplo n.º 13
0
		/// <summary>
		/// Initializes a new instance of the <see cref="ThemeInfoCollection">ThemeInfoCollection</see> class containing the specified array of <see cref="ThemeInfo">ThemeInfo</see> Components.
		/// </summary>
		/// <param name="value">An array of <see cref="ThemeInfo">ThemeInfo</see> Components with which to initialize the collection. </param>
		public ThemeInfoCollection(ThemeInfo[] value)
		{
			this.AddRange(value);
		}
Ejemplo n.º 14
0
		public void Remove(ThemeInfo value) 
		{
			List.Remove(value);
		}
Ejemplo n.º 15
0
		public void Insert(int index, ThemeInfo value)	
		{
			List.Insert(index, value);
		}
Ejemplo n.º 16
0
		/// <summary>
		/// Gets the index in the collection of the specified <see cref="ThemeInfoCollection">ThemeInfoCollection</see>, if it exists in the collection.
		/// </summary>
		/// <param name="value">The <see cref="ThemeInfoCollection">ThemeInfoCollection</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(ThemeInfo value) 
		{
			return this.List.IndexOf(value);
		}