Click here to Skip to main content
15,885,896 members
Articles / Desktop Programming / Windows Forms

BSEtunes

Rate me:
Please Sign up or sign in to vote.
4.67/5 (11 votes)
24 Apr 2010CPOL4 min read 64.6K   4.3K   58  
BSEtunes is a MySQL based, full manageable, networkable single or multiuser jukebox application
using System;

namespace BSE.Platten.BO
{
	/// <summary>
	/// Zusammenfassung f�r CTrack.
	/// </summary>
	public class CTrack : ICloneable
	{
		
		#region FieldsPrivate
		
		private int m_iTitelId;
		private int m_iLiedId;
		private int m_iIndex;
		private int m_iCDIndex;
		private int m_iTrackNumber;
		private string m_strInterpret;
		private string m_strAlbum;
		private string m_strTitle;
		private int m_iYear;
		private int m_iMediumId;
		private string m_strMedium;
		private int m_iGenreId;
		private string m_strGenre;
		private System.Drawing.Image m_imgCover;
        private System.Drawing.Image m_imgTumbNail;
		private DateTime m_dDuration;
		private uint m_iTrackSize;
		private CAudioFormat.AudioFormat m_eUsedAudioFormat;
		private string m_strFileName;
		private string m_strFileFullName;
        private string m_strExtension;
        private string m_strIdentifier;
		
		#endregion
		
		#region Properties
		
		/// <summary>
		/// Gets or sets the id of the album.
		/// </summary>
		public int TitelId
		{
			get {return this.m_iTitelId;}
			set {this.m_iTitelId = value;}
		}
		/// <summary>
		/// Gets or sets the id of the track.
		/// </summary>
		public int LiedId
		{
			get {return this.m_iLiedId;}
			set {this.m_iLiedId = value;}
		}
		/// <summary>
		/// Gets or sets the index of the track.
		/// </summary>
		public int Index
		{
			get {return this.m_iIndex;}
			set {this.m_iIndex = value;}
		}
		/// <summary>
		/// Gets or sets the cd index of the track beginning at 1.
		/// </summary>
		public int CDIndex
		{
			get {return this.m_iCDIndex;}
			set {this.m_iCDIndex = value;}
		}
		/// <summary>
		/// Gets or sets the tracknumber of the track.
		/// </summary>
		public int TrackNumber
		{
			get {return this.m_iTrackNumber;}
			set {this.m_iTrackNumber = value;}
		}
		/// <summary>
		/// Gets or sets the interpret of the track.
		/// </summary>
		public string Interpret
		{
			get {return this.m_strInterpret;}
			set {this.m_strInterpret = value;}
		}
		/// <summary>
		/// Gets or sets the album of the track.
		/// </summary>
		public string Album
		{
			get {return this.m_strAlbum;}
			set {this.m_strAlbum = value;}
		}

		/// <summary>
		/// Gets or sets the title of the track.
		/// </summary>
		public string Title
		{
			get {return this.m_strTitle;}
			set {this.m_strTitle = value;}
		}
		/// <summary>
		/// Gets or sets the year of the tracks album.
		/// </summary>
		public int Year
		{
			get {return this.m_iYear;}
			set {this.m_iYear = value;}
		}
		/// <summary>
		/// Gets or sets the mediumid of the tracks album.
		/// </summary>
		public int MediumId
		{
			get {return this.m_iMediumId;}
			set {this.m_iMediumId = value;}
		}
		/// <summary>
		/// Gets or sets the medium of the tracks album.
		/// </summary>
		public string Medium
		{
			get {return this.m_strMedium;}
			set {this.m_strMedium = value;}
		}
		/// <summary>
		/// Gets or sets the genreid of the tracks album.
		/// </summary>
		public int GenreId
		{
			get {return this.m_iGenreId;}
			set {this.m_iGenreId = value;}
		}
		/// <summary>
		/// Gets or sets the genre of the tracks album.
		/// </summary>
		public string Genre
		{
			get {return this.m_strGenre;}
			set {this.m_strGenre = value;}
		}
		/// <summary>
		/// Gets or sets the cover of the tracks album.
		/// </summary>
		public System.Drawing.Image Cover
		{
			get {return this.m_imgCover;}
			set {this.m_imgCover = value;}
		}
        /// <summary>
        /// Gets or sets the thumbnail of the tracks album.
        /// </summary>
        public System.Drawing.Image ThumbNail
        {
            get { return this.m_imgTumbNail; }
            set { this.m_imgTumbNail = value; }
        }
		/// <summary>
		/// Gets or sets the duration of the track.
		/// </summary>
		public DateTime Duration
		{
			get {return this.m_dDuration;}
			set {this.m_dDuration = value;}
		}
		/// <summary>
		/// Gets or sets the size of the track.
		/// </summary>
		public uint TrackSize
		{
			get {return this.m_iTrackSize;}
			set {this.m_iTrackSize = value;}
		}
		/// <summary>
		/// Gets or sets the audioformat of the track.
		/// </summary>
		public CAudioFormat.AudioFormat UsedAudioFormat
		{
			get {return this.m_eUsedAudioFormat;}
			set {this.m_eUsedAudioFormat = value;}
		}
		/// <summary>
		/// Gets or sets the name of the track.
		/// </summary>
		public string FileName
		{
			get {return this.m_strFileName;}
			set {this.m_strFileName = value;}
		}
		/// <summary>
		/// Gets or sets the full path of the directory or track.
		/// </summary>
		public string FileFullName
		{
			get {return this.m_strFileFullName;}
			set {this.m_strFileFullName = value;}
		}
        /// <summary>
        /// Gets or sets the string representing the extension part of the track file.
        /// </summary>
        public string Extension
        {
            get { return m_strExtension; }
            set { m_strExtension = value; }
        }
		/// <summary>
		/// Gets or sets the track identifier.
		/// </summary>
		public string Identifier
		{
			get {return this.m_strIdentifier;}
			set {this.m_strIdentifier = value;}
		}
		
		#endregion

		#region MethodsPublic

		public CTrack()
		{
			//
			// TODO: F�gen Sie hier die Konstruktorlogik hinzu
			//
		}
		
		/// <summary>
		/// Creates a new object that is a copy of the current track.
		/// </summary>
		/// <returns>A new object that is a copy of this track.</returns>
		public virtual object Clone()
		{
			CTrack track = new CTrack();
			track.TitelId = this.m_iTitelId;
			track.LiedId = this.m_iLiedId;
			track.Index = this.m_iIndex;
			track.CDIndex = this.m_iCDIndex;
			track.TrackNumber = this.m_iTrackNumber;
            if (string.IsNullOrEmpty(this.m_strInterpret) == false)
            {
                track.Interpret = (string)this.m_strInterpret.Clone(); ;
            }
            if (string.IsNullOrEmpty(this.m_strAlbum) == false)
            {
                track.Album = (string)this.m_strAlbum.Clone();
            }
            if (string.IsNullOrEmpty(this.m_strTitle) == false)
            {
                track.Title = (string)this.m_strTitle.Clone();
            }
			track.Year = this.m_iYear;
			track.MediumId = this.m_iMediumId;
			track.Medium = this.m_strMedium;
			track.GenreId = this.m_iGenreId;
            if (string.IsNullOrEmpty(this.m_strGenre) == false)
            {
                track.Genre = (string)this.m_strGenre.Clone();
            }
            if (this.m_imgCover != null)
            {
                track.Cover = (System.Drawing.Image)this.m_imgCover.Clone();
            }
            if (this.m_imgTumbNail != null)
            {
                track.ThumbNail = (System.Drawing.Image)this.m_imgTumbNail.Clone();
            }
			track.Duration = this.m_dDuration;
			track.TrackSize = this.TrackSize;
            if (string.IsNullOrEmpty(this.m_strFileName) == false)
            {
                track.FileName = (string)this.m_strFileName.Clone();
            }
            if (string.IsNullOrEmpty(this.m_strFileFullName) == false)
            {
                track.FileFullName = (string)this.m_strFileFullName.Clone();
            }
            if (string.IsNullOrEmpty(this.m_strExtension) == false)
            {
                track.Extension = (string)this.m_strExtension.Clone();
            }
            if (this.m_strIdentifier != null)
            {
                track.Identifier = (string)this.m_strIdentifier.Clone();
            }
			
			return (object)track;
		}

		#endregion

	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Switzerland Switzerland
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions