public void SaveWindowInfo() { _cfgAcccess.IssuesCredential.userid = IssueReportHelper.EncryptString(txtUserID); _cfgAcccess.IssuesCredential.password = IssueReportHelper.EncryptString(txtPassword); List <Repository> repositories = new List <Repository>(_cfgAcccess.Repositories); foreach (Issue issue in gridItems) { int nIndex = 0; foreach (Repository rep in _cfgAcccess.Repositories) { if (issue.Repository.CompareTo(rep.Name) == 0) { int nCount = 0; bool bExist = false; if (rep.githubissues != null) { foreach (GithubIssue gitissue in rep.githubissues) { if (gitissue.number == issue.Number) { _cfgAcccess.Repositories[nIndex].githubissues[nCount].assignee = issue.Assignee; bExist = true; break; } nCount++; } } if (!bExist) { GithubIssue [] array = _cfgAcccess.Repositories[nIndex].githubissues; int newsize = _cfgAcccess.Repositories[nIndex].githubissues != null? _cfgAcccess.Repositories[nIndex].githubissues.Length + 1:1; Array.Resize(ref array, newsize); GithubIssue ghIssue = new GithubIssue(); ghIssue.assignee = issue.Assignee; ghIssue.number = issue.Number; array[newsize - 1] = ghIssue; _cfgAcccess.Repositories[nIndex].githubissues = array; } else { continue; } } nIndex++; } } //_cfgAcccess.Repositories = cmbRepositories; _cfgAcccess.SelectedRepository = SelectedRepository; _cfgAcccess.SavetoConfigData(); }
public void SaveWindowInfo() { _cfgAcccess.RallyCredential.userid = RallyReportHelper.EncryptString(txtUserID); _cfgAcccess.RallyCredential.password = RallyReportHelper.EncryptString(txtPassword); _cfgAcccess.Projects = cmbProjects; _cfgAcccess.Releases = cmbReleases; _cfgAcccess.Sprints = cmbSprints; _cfgAcccess.SelectedProject = SelectedProject; _cfgAcccess.SelectedRelease = SelectedRelease; _cfgAcccess.SelectedSprint = SelectedSprint; _cfgAcccess.SelectedReportType = SelectedReportType; _cfgAcccess.SavetoConfigData(); }