Esempio n. 1
0
 /// <summary>Compares to SpiraProjects and returns whether they are equal or not.</summary>
 /// <param name="inProject1">One of the SpiraProjects to compare.</param>
 /// <param name="inProject2">Another SpiraProject to compare.</param>
 /// <returns>True if the settings are the same, false if not.</returns>
 public bool IsEqual(SpiraProject inProject1, SpiraProject inProject2)
 {
     if (inProject2.ServerURL.AbsoluteUri.Trim() == inProject1.ServerURL.AbsoluteUri.Trim() &&
         inProject2.UserName == inProject1.UserName &&
         inProject2.ProjectNum == inProject1.ProjectNum)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Esempio n. 2
0
 /// <summary>Returns a savable string from a project object.</summary>
 /// <param name="inProject">The SpiraProject to convert.</param>
 /// <returns>A string of the fields seperated by the field seperator.</returns>
 static internal string GenerateToString(SpiraProject inProject)
 {
     if (inProject != null)
     {
         return(inProject.UserName + SpiraProject.CHAR_FIELD +
                inProject.UserPass + SpiraProject.CHAR_FIELD +
                inProject.ServerURL.AbsoluteUri + SpiraProject.CHAR_FIELD +
                inProject.ProjectNum.ToString() + SpiraProject.CHAR_FIELD +
                inProject.ProjectName + SpiraProject.CHAR_FIELD);
     }
     else
     {
         return(null);
     }
 }
Esempio n. 3
0
        /// <summary>Converts an encoded string into a SpiraProject. Uses \xE for field seperation.</summary>
        /// <param name="inString">The string to decode.</param>
        /// <returns>A SpiraProject based on the given string, or null if error.</returns>
        static internal SpiraProject GenerateFromString(string inString)
        {
            //Get the values.
            string[] values = inString.Split(SpiraProject.CHAR_FIELD);

            try
            {
                SpiraProject retProject = new SpiraProject();

                retProject.UserName    = values[0];
                retProject.UserPass    = values[1];
                retProject.ServerURL   = new Uri(values[2]);
                retProject.ProjectNum  = int.Parse(values[3]);
                retProject.ProjectName = values[4];

                return(retProject);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
Esempio n. 4
0
 /// <summary>Creates a new instance of the class to perform the work.</summary>
 /// <param name="spiraProject">The SpiraTeam project to use for importing.</param>
 /// <param name="jamaProject">The Jama Contour project used for importing.</param>
 /// <param name="ProgressForm">The ProgressForm. Should probably be a delegate, but the form will work for now.</param>
 /// <param name="ExistingMappings">Mappings already defined for this combination.</param>
 public ProcessThread(SpiraProject spiraProject, JamaProjectInfo jamaProject)
 {
     this._JamaProject  = jamaProject;
     this._SpiraProject = spiraProject;
 }