/// <summary>
    /// Logs message to for asynchronous displaying.
    /// </summary>
    /// <param name="line">Message to be displayed</param>
    /// <param name="type">Type of a message</param>
    /// <param name="logToEventLog">Log to event log</param>
    public void LogMessage(string line, MessageTypeEnum type, bool logToEventLog)
    {
        if (!line.EndsWithCSafe("<br />", StringComparison.InvariantCultureIgnoreCase))
        {
            line = line + "<br />";
        }
        ProgressMessagesHelper progressMessages = new ProgressMessagesHelper();

        switch (type)
        {
        case MessageTypeEnum.Info:
            progressMessages.LogInfo(line, SourceText, EventCodeText, logToEventLog);
            break;

        case MessageTypeEnum.Warning:
            progressMessages.LogWarning(line, SourceText, EventCodeText, logToEventLog);
            break;

        case MessageTypeEnum.Error:
            progressMessages.LogError(line, SourceText, EventCodeText, logToEventLog);
            break;

        case MessageTypeEnum.Finished:
            progressMessages.LogQuit(line, SourceText, EventCodeText, logToEventLog);
            break;
        }
    }
    /// <summary>
    /// Logs message to for asynchronous displaying.
    /// </summary>
    /// <param name="line">Message to be displayed</param>
    /// <param name="type">Type of a message</param>
    /// <param name="logToEventLog">Log to event log</param>
    public void LogMessage(string line, CMSDatabaseHelper.MessageType type, bool logToEventLog)
    {
        if (!line.EndsWith("<br />") && !line.EndsWith("<BR />"))
        {
            line = line + "<br />";
        }
        ProgressMessagesHelper progressMessages = new ProgressMessagesHelper();

        switch (type)
        {
        case CMSDatabaseHelper.MessageType.Info:
            progressMessages.LogInfo(line, SourceText, EventCodeText, logToEventLog);
            break;

        case CMSDatabaseHelper.MessageType.Error:
            progressMessages.LogError(line, SourceText, EventCodeText, logToEventLog);
            break;

        case CMSDatabaseHelper.MessageType.Finished:
            progressMessages.LogQuit(line, SourceText, EventCodeText, logToEventLog);
            break;
        }
    }
    /// <summary>
    /// Logs message to for asynchronous displaying.
    /// </summary>
    /// <param name="line">Message to be displayed</param>
    /// <param name="type">Type of a message</param>
    /// <param name="logToEventLog">Log to event log</param>
    public void LogMessage(string line, MessageTypeEnum type, bool logToEventLog)
    {
        if (!line.EndsWithCSafe("<br />", StringComparison.InvariantCultureIgnoreCase))
        {
            line = line + "<br />";
        }
        ProgressMessagesHelper progressMessages = new ProgressMessagesHelper();
        switch (type)
        {
            case MessageTypeEnum.Info:
                progressMessages.LogInfo(line, SourceText, EventCodeText, logToEventLog);
                break;

            case MessageTypeEnum.Warning:
                progressMessages.LogWarning(line, SourceText, EventCodeText, logToEventLog);
                break;

            case MessageTypeEnum.Error:
                progressMessages.LogError(line, SourceText, EventCodeText, logToEventLog);
                break;

            case MessageTypeEnum.Finished:
                progressMessages.LogQuit(line, SourceText, EventCodeText, logToEventLog);
                break;
        }
    }
    /// <summary>
    /// Logs message to for asynchronous displaying.
    /// </summary>
    /// <param name="line">Message to be displayed</param>
    /// <param name="type">Type of a message</param>
    /// <param name="logToEventLog">Log to event log</param>
    public void LogMessage(string line, CMSDatabaseHelper.MessageType type, bool logToEventLog)
    {
        if (!line.EndsWith("<br />") && !line.EndsWith("<BR />"))
        {
            line = line + "<br />";
        }
        ProgressMessagesHelper progressMessages = new ProgressMessagesHelper();
        switch (type)
        {
            case CMSDatabaseHelper.MessageType.Info:
                progressMessages.LogInfo(line, SourceText, EventCodeText, logToEventLog);
                break;
            case CMSDatabaseHelper.MessageType.Error:
                progressMessages.LogError(line, SourceText, EventCodeText, logToEventLog);
                break;

            case CMSDatabaseHelper.MessageType.Finished:
                progressMessages.LogQuit(line, SourceText, EventCodeText, logToEventLog);
                break;
        }
    }