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.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)