/// <summary>Hit when we've completed connecting to the project. </summary>
        /// <param name="sender">ImportExporClient</param>
        /// <param name="e">Connection_ConnectToProjectCompletedEventArgs</param>
        private void wkfClient_Connection_ConnectToProjectCompleted(object sender, Connection_ConnectToProjectCompletedEventArgs e)
        {
            try
            {
                const string METHOD = CLASS + "wkfClient_Connection_ConnectToProjectCompleted()";
                Logger.LogTrace(METHOD + " ENTER.");

                this._clientNumRunning--;
                this.barLoadingIncident.Value++;

                if (sender is ImportExportClient)
                {
                    ImportExportClient client = sender as ImportExportClient;

                    if (!e.Cancelled)
                    {
                        if (e.Error == null && e.Result)
                        {
                            //Get the current status/type..
                            int intStatus = ((this._IncSelectedStatus.HasValue) ? this._IncSelectedStatus.Value : this._IncCurrentStatus.Value);
                            int intType   = ((this._IncSelectedType.HasValue) ? this._IncSelectedType.Value : this._IncCurrentType.Value);
                            //Get the current workflow fields here.
                            this._clientNumRunning += 2;
                            client.Incident_RetrieveWorkflowCustomPropertiesAsync(intType, intStatus, this._clientNum++);
                            client.Incident_RetrieveWorkflowFieldsAsync(intType, intStatus, this._clientNum++);
                        }
                        else
                        {
                            if (e.Error != null)
                            {
                                Logger.LogMessage(e.Error);
                            }
                            else
                            {
                                Logger.LogMessage(METHOD, "Could not log in.", System.Diagnostics.EventLogEntryType.Error);
                            }
                        }
                    }
                }

                Logger.LogTrace_ExitMethod(METHOD + "  Clients - Running: " + this._clientNumRunning.ToString() + ", Total: " + this._clientNum.ToString());
            }
            catch (Exception ex)
            {
                Logger.LogMessage(ex, "wkfClient_Connection_ConnectToProjectCompleted()");
                MessageBox.Show(StaticFuncs.getCultureResource.GetString("app_General_UnexpectedError"), StaticFuncs.getCultureResource.GetString("app_General_ApplicationShortName"), MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }