/// <summary> /// Identifies all the selected releases based on the passed in values from the user /// </summary> /// <param name="userselect"></param> public void SelectedReleases(string userselect) { Logger.Log(String.Format(CultureInfo.InvariantCulture, "Selection passed: {0}", userselect), Logger.MessageLevel.Information, AppName); var selected = userselect.Split(',').Select(i => i.Trim()).ToList(); Logger.Log(String.Format(CultureInfo.InvariantCulture, "Selected releases: {0}", userselect.Count().ToString(CultureInfo.InvariantCulture))); foreach (string id in selected) { // 0-based array var pos = Convert.ToInt32(id, CultureInfo.InvariantCulture) - 1; Logger.Log(String.Format(CultureInfo.InvariantCulture, "Installed: {0} ({1})", Releases.ElementAt(pos).Name, Releases.ElementAt(pos).Installed.ToString())); Logger.Log(String.Format(CultureInfo.InvariantCulture, "Selected set to true: {0}", Releases.ElementAt(pos).Name)); if (pos <= this.Releases.Count()) { this.Releases.ElementAtOrDefault(pos).Selected = true; } } }