/// <summary>Hit after we have successfully logged on. Launches off connecting to the project.</summary>
        /// <param name="sender">ImportExport</param>
        /// <param name="e">Event Args</param>
        private void LoadItem_Task1(object sender, Spira_ImportExport.Connection_Authenticate2CompletedEventArgs e)
        {
            try
            {
                if (e.Error == null)
                {
                    int incidentID = (int)e.UserState;

                    //Get server version.
                    this.LoadItem_VerifyVersion(this._Client);

                    this._Client.Connection_ConnectToProjectAsync(this._Project.ProjectID, this._NumCount++);
                }
                else
                {
                    this.panelLoading.Visibility      = Visibility.Collapsed;
                    this.panelLoadingError.Visibility = Visibility.Visible;
                    this.msgLoadingErrorMsg.Text      = getErrorMessage(e.Error);
                }
            }
            catch (Exception ex)
            {
                Connect.logEventMessage("wpfDetailsTask::LoadItem_Task1", ex, System.Diagnostics.EventLogEntryType.Error);
            }
        }
示例#2
0
 /// <summary>Hit after we have successfully logged on. Launches off connecting to the project.</summary>
 /// <param name="sender">ImportExport</param>
 /// <param name="e">Event Args</param>
 private void LoadItem_Task1(object sender, Spira_ImportExport.Connection_Authenticate2CompletedEventArgs e)
 {
     try
     {
         if (e.Error == null)
         {
             this._Client.Connection_ConnectToProjectAsync(this._Project.ProjectID, this._NumCount++);
         }
         else
         {
             this.panelLoading.Visibility      = Visibility.Collapsed;
             this.panelLoadingError.Visibility = Visibility.Visible;
             this.msgLoadingErrorMsg.Text      = getErrorMessage(e.Error);
             Connect.logEventMessage("wpfDetailsRequirement::LoadItem_Task1. Error communicating!", e.Error, System.Diagnostics.EventLogEntryType.Error);
         }
     }
     catch (Exception ex)
     {
         Connect.logEventMessage("wpfDetailsRequirement::LoadItem_Task1", ex, System.Diagnostics.EventLogEntryType.Error);
     }
 }