Click here to Skip to main content
15,881,424 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.4K   4.3K   58  
BSEtunes is a MySQL based, full manageable, networkable single or multiuser jukebox application
using System;
using System.Collections.Generic;
using System.Text;
using BSE.Platten.BO;

namespace BSE.Platten.Common
{
    /// <summary>
    /// Thread class for checking the database host and verifying the user privileges.
    /// </summary>
    public class CheckDataBaseHostThread : BSE.Platten.Common.BaseThread
    {
        #region Events
        /// <summary>
        /// Occurs when the Database host was checked.
        /// </summary>
        public event EventHandler<HostAvailableEventArgs> HostChecked;
        #endregion

        #region FieldsPrivate
        private CEnvironment m_environment;
        #endregion

        #region MethodsPublic
        /// <summary>
        /// Initializes a new instance of the CheckDataBaseHostThread class.
        /// </summary>
        /// <param name="environment">The <see cref="CEnvironment"/> object.</param>
        public CheckDataBaseHostThread(CEnvironment environment)
            : base()
        {
            this.m_environment = environment;
            base.Thread = new System.Threading.Thread(
               new System.Threading.ThreadStart(this.CheckDataBaseHostIfAvailable));
            base.Thread.Start();
        }
        #endregion

        #region MethodsPrivate
        private void CheckDataBaseHostIfAvailable()
        {
            DatabaseHostAvailability databaseHostAvailability = CToolStripStatusLabelCheckDB.GetDatabaseHostAvailability(this.m_environment);
            if (databaseHostAvailability != null)
            {
                if (this.HostChecked != null)
                {
                    HostChecked(this, new HostAvailableEventArgs(
                        databaseHostAvailability));
                }
            }
        }
        #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