public static List <string> GetAllGridsRawContentFromForum(string iURL, CookieCollection iLogCookies) { CookieCollection oCookies = new CookieCollection(); HttpStatusCode oCode = HttpStatusCode.NotFound; HtmlDocument answer = Service_Misc.GetWebPageFromRequest("GET " + iURL + " HTTP/1.1|Host: miqobot.com|Connection: keep-alive|Cache-Control: max-age=0|Upgrade-Insecure-Requests: 1|User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36|Sec-Fetch-Mode: navigate|Sec-Fetch-User: ?1|Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3|Sec-Fetch-Site: same-origin|Referer: https://miqobot.com/forum/wp-login.php?redirect_to=https%3A%2F%2Fmiqobot.com%2Fforum%2Fforums%2Ftopic%2Fgrade-1-carbonized-matter-min-lv20%2F|Accept-Encoding: gzip, deflate, br|Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7|", iLogCookies, ref oCookies, ref oCode); if (null == answer) { return(null); } List <string> attachmentsList = new List <string>(); List <HtmlNode> listAllAttachmentsNode = answer.DocumentNode.Descendants("div").ToList(); foreach (HtmlNode node in listAllAttachmentsNode) { if (node.GetAttributeValue("class", "") == "bbp-attachments") { attachmentsList.Add(Service_Misc.ExtractLink(node)); } } List <string> listGrids = new List <string>(); foreach (string attachmentLink in attachmentsList) { string gridRawContent = Service_Misc.GetContentFromRequest("GET " + attachmentLink + " HTTP/1.1|Host: miqobot.com|Connection: keep-alive|Upgrade-Insecure-Requests: 1|User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36|Sec-Fetch-Mode: navigate|Sec-Fetch-User: ?1|Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3|Sec-Fetch-Site: same-origin|Referer: https://miqobot.com/forum/forums/topic/grade-1-carbonized-matter-min-lv20/|Accept-Encoding: gzip, deflate, br|Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7|", iLogCookies, ref oCookies, ref oCode); listGrids.Add(gridRawContent); } return(listGrids); }
public static string GetLastGrid(string iItemName, CookieCollection iLogCookies, MiqoItemPage iPage, out string oGridName) { string gridItemName = iItemName + " Grid"; oGridName = ""; CookieCollection oCookies = new CookieCollection(); HttpStatusCode oCode = HttpStatusCode.NotFound; //Looking into cache directory DirectoryInfo exeDirectory = new DirectoryInfo(Service_Misc.GetExecutionPath()); DirectoryInfo cacheDirectory = new DirectoryInfo(Path.Combine(exeDirectory.FullName, "CacheGrid")); if (!cacheDirectory.Exists) { cacheDirectory.Create(); } string gridRawContent = ""; FileInfo cacheGridFile = new FileInfo(Path.Combine(cacheDirectory.FullName, gridItemName + ".txt")); if (cacheGridFile.Exists) { oGridName = gridItemName; gridRawContent = System.IO.File.ReadAllText(cacheGridFile.FullName); } else { HtmlDocument answer = Service_Misc.GetWebPageFromRequest("GET " + iPage.URL + " HTTP/1.1|Host: miqobot.com|Connection: keep-alive|Cache-Control: max-age=0|Upgrade-Insecure-Requests: 1|User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36|Sec-Fetch-Mode: navigate|Sec-Fetch-User: ?1|Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3|Sec-Fetch-Site: same-origin|Referer: https://miqobot.com/forum/wp-login.php?redirect_to=https%3A%2F%2Fmiqobot.com%2Fforum%2Fforums%2Ftopic%2Fgrade-1-carbonized-matter-min-lv20%2F|Accept-Encoding: gzip, deflate, br|Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7|", iLogCookies, ref oCookies, ref oCode); if (null == answer) { return(null); } string lastUrlAttachment = ""; List <HtmlNode> listAllAttachmentsNode = answer.DocumentNode.Descendants("div").ToList(); foreach (HtmlNode node in listAllAttachmentsNode) { if (node.GetAttributeValue("class", "") == "bbp-attachments") { lastUrlAttachment = Service_Misc.ExtractLink(node); } } gridRawContent = Service_Misc.GetContentFromRequest("GET " + lastUrlAttachment + " HTTP/1.1|Host: miqobot.com|Connection: keep-alive|Upgrade-Insecure-Requests: 1|User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36|Sec-Fetch-Mode: navigate|Sec-Fetch-User: ?1|Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3|Sec-Fetch-Site: same-origin|Referer: https://miqobot.com/forum/forums/topic/grade-1-carbonized-matter-min-lv20/|Accept-Encoding: gzip, deflate, br|Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7|", iLogCookies, ref oCookies, ref oCode); } return(GetGridFromRawContent(iItemName, gridRawContent, out oGridName)); }
/// <summary> /// Logs into miqoot forums /// </summary> /// <returns></returns> public static CookieCollection LogInForum() { CookieCollection iCookies = new CookieCollection(); CookieCollection oCookies = new CookieCollection(); HttpStatusCode oCode = HttpStatusCode.NotFound; string answer = Service_Misc.GetContentFromRequest("POST https://miqobot.com/forum/wp-login.php HTTP/1.1|Host: miqobot.com|Connection: keep-alive|Content-Length: 128|Cache-Control: max-age=0|Origin: https://miqobot.com|Upgrade-Insecure-Requests: 1|Content-Type: application/x-www-form-urlencoded|User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36|Sec-Fetch-Mode: navigate|Sec-Fetch-User: ?1|Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3|Sec-Fetch-Site: same-origin|Referer: https://miqobot.com/forum/wp-login.php|Accept-Encoding: gzip, deflate, br|Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7|Cookie: wordpress_test_cookie=WP+Cookie+check; _ga=GA1.2.1771485810.1566089776||", iCookies, ref oCookies, ref oCode, "log=miqocrafter%40gmail.com&pwd=.f%2Fg%24%5D%21zzNb4&wp-submit=Log+In&redirect_to=https%3A%2F%2Fmiqobot.com%2Fforum&testcookie=1"); if (answer != "0" && oCode != HttpStatusCode.OK) { return(null); } return(oCookies); }
/// <summary> /// Retrieve an item name from its ID /// </summary> /// <param name="iItemID"></param> /// <returns></returns> public static string GetItemName(string iItemID) { if (null == iItemID) { return(""); } //https://www.garlandtools.org/db/doc/item/en/3/26498.json CookieCollection iCookies = new CookieCollection(); CookieCollection oCookies = new CookieCollection(); HttpStatusCode oCode = HttpStatusCode.NotFound; string searchResultContent = Service_Misc.GetContentFromRequest("GET https://www.garlandtools.org/db/doc/item/en/3/" + iItemID + ".json HTTP/1.1|Host: www.garlandtools.org|Connection: keep-alive|Pragma: no-cache|Cache-Control: no-cache|Upgrade-Insecure-Requests: 1|User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36|Sec-Fetch-Mode: navigate|Sec-Fetch-User: ?1|Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3|Sec-Fetch-Site: cross-site|Accept-Encoding: gzip, deflate|Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7|", iCookies, ref oCookies, ref oCode); try { JToken mainToken = JObject.Parse(searchResultContent); if (null == mainToken) { return(""); } JToken itemToken = mainToken["item"]; if (null == itemToken) { return(""); } return(itemToken["name"].Value <string>()); } catch { } return(""); }
private static FFXIVGatheredItem ReadGatheredItem(CookieCollection iCookies, ref CookieCollection oCookies, ref HttpStatusCode oCode, JToken dataToken, JToken itemToken, JToken nodeToken) { FFXIVGatheredItem gatheredItem = new FFXIVGatheredItem(); //Adding nodes info foreach (JToken gatherNodeToken in nodeToken.Children()) { try { string nodeSearchContent = Service_Misc.GetContentFromRequest("GET http://garlandtools.org/db/doc/node/en/2/" + gatherNodeToken.Value <string>() + ".json HTTP/1.1|Host: garlandtools.org|Connection: keep-alive|Accept: application/json, text/javascript, */*; q=0.01|X-Requested-With: XMLHttpRequest|User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36|Referer: http://garlandtools.org/db/|Accept-Encoding: gzip, deflate|Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7|", iCookies, ref oCookies, ref oCode); try { string logName2 = Path.Combine(Service_Misc.GetExecutionPath(), "Node.log"); File.WriteAllText(logName2, nodeSearchContent); } catch { } JToken gatherResultToken = JObject.Parse(nodeSearchContent); if (null == gatherResultToken) { continue; } JToken gatherResultNodeToken = gatherResultToken.Children().ToList()[0].Children().ToList()[0]; if (null == gatherResultNodeToken) { continue; } string zoneID = gatherResultNodeToken["zoneid"].Value <string>(); JToken locationToken = dataToken["locationIndex"]; if (null == locationToken) { continue; } JToken zoneIDToken = locationToken[zoneID]; if (null == zoneIDToken) { continue; } JToken zoneNameToken = zoneIDToken["name"]; if (null == zoneNameToken) { continue; } string zone = zoneNameToken.Value <string>(); string gatheringType = gatherResultNodeToken["type"].Value <string>(); string type = ""; if (null != gatherResultNodeToken["limitType"]) { type = gatherResultNodeToken["limitType"].Value <string>(); } string slot = ""; foreach (JToken slotToken in gatherResultNodeToken["items"]) { if (null == slotToken) { continue; } if (null == slotToken["slot"]) { continue; } if (null == slotToken["id"]) { continue; } string id = slotToken["id"].Value <string>(); string slotCandidate = slotToken["slot"].Value <string>(); if (id == itemToken["id"].Value <string>()) { slot = slotCandidate; break; } } string time = ""; if (null != gatherResultNodeToken["time"]) { foreach (JToken timeToken in gatherResultNodeToken["time"]) { if (null == timeToken) { continue; } if (time != "") { time += ","; } time += timeToken.Value <string>(); } } gatheredItem.Zones.Add(zone); gatheredItem.NodeType.Add(""); gatheredItem.Slot.Add(slot); gatheredItem.Times.Add(time); gatheredItem.Types.Add(type); gatheredItem.GatheringTypes.Add(gatheringType); } catch (Exception exc) { string msg = exc.Message; } } return(gatheredItem); }
/// <summary> /// Recursively build an item craft tree /// </summary> /// <param name="iItem"></param> public static FFXIVItem RecBuildCraftingTree(System.Windows.Forms.TextBox iLogBox, string iItemID, int quantity = 1) { if (null == iItemID) { return(null); } //https://www.garlandtools.org/db/doc/item/en/3/26498.json FFXIVItem item = null; CookieCollection iCookies = new CookieCollection(); CookieCollection oCookies = new CookieCollection(); HttpStatusCode oCode = HttpStatusCode.NotFound; string searchResultContent = Service_Misc.GetContentFromRequest("GET https://www.garlandtools.org/db/doc/item/en/3/" + iItemID + ".json HTTP/1.1|Host: www.garlandtools.org|Connection: keep-alive|Pragma: no-cache|Cache-Control: no-cache|Upgrade-Insecure-Requests: 1|User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36|Sec-Fetch-Mode: navigate|Sec-Fetch-User: ?1|Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3|Sec-Fetch-Site: cross-site|Accept-Encoding: gzip, deflate|Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7|", iCookies, ref oCookies, ref oCode); try { string logName2 = Path.Combine(Service_Misc.GetExecutionPath(), "Searchlog.log"); File.WriteAllText(logName2, searchResultContent); } catch { } string logName = Path.Combine(Service_Misc.GetExecutionPath(), "GeneralDataBase.log"); string dataResultContent = ""; if (File.Exists(logName)) { dataResultContent = File.ReadAllText(logName); } if (dataResultContent == "") { dataResultContent = Service_Misc.RemoveIllegalCharacters(Service_Misc.GetContentFromRequest("GET http://garlandtools.org/db/doc/core/en/3/data.json HTTP/1.1|Host: garlandtools.org|Connection: keep-alive|Pragma: no-cache|Cache-Control: no-cache|Accept: application/json, text/javascript, */*; q=0.01|X-Requested-With: XMLHttpRequest|User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36|Referer: http://garlandtools.org/db/|Accept-Encoding: gzip, deflate|Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7|", iCookies, ref oCookies, ref oCode)); try { File.WriteAllText(logName, dataResultContent); } catch { } } try { JToken mainToken = JObject.Parse(searchResultContent); if (null == mainToken) { return(item); } JToken dataToken = JObject.Parse(dataResultContent); if (null == dataToken) { return(item); } JToken itemToken = mainToken["item"]; if (null == itemToken) { return(item); } JToken mainIngredientToken = mainToken["ingredients"]; List <JToken> allIngredientsToken = new List <JToken>(); List <string> allIngredientsIDs = new List <string>(); if (null != mainIngredientToken) { //Listing ingredients nodes and ID foreach (JToken ingredientToken in mainIngredientToken.Children()) { if (null == ingredientToken) { continue; } string ID = ingredientToken["id"].Value <string>(); allIngredientsIDs.Add(ID); allIngredientsToken.Add(ingredientToken); } } item = CreateItemFromNode(iLogBox, iCookies, ref oCookies, ref oCode, itemToken, dataToken, allIngredientsToken, allIngredientsIDs); if (null != item) { item.Quantity = quantity; } } catch (Exception exc) { Service_Misc.LogText(iLogBox, "Ouch I failed !"); Service_Misc.LogText(iLogBox, exc.Message); } if (null != item) { Service_Misc.LogText(iLogBox, "Got this item ! " + item); } return(item); }
/// <summary> /// Retrieve all gathering nodes from an item /// </summary> /// <param name="iItemID"></param> /// <returns></returns> public static List <FFXIVGatheringNode> GetGatheringNodesFromItem(string iItemID) { List <FFXIVGatheringNode> result = new List <FFXIVGatheringNode>(); if (null == iItemID) { return(result); } //https://www.garlandtools.org/db/doc/item/en/3/26498.json CookieCollection iCookies = new CookieCollection(); CookieCollection oCookies = new CookieCollection(); HttpStatusCode oCode = HttpStatusCode.NotFound; string searchResultContent = Service_Misc.GetContentFromRequest("GET https://www.garlandtools.org/db/doc/item/en/3/" + iItemID + ".json HTTP/1.1|Host: www.garlandtools.org|Connection: keep-alive|Pragma: no-cache|Cache-Control: no-cache|Upgrade-Insecure-Requests: 1|User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36|Sec-Fetch-Mode: navigate|Sec-Fetch-User: ?1|Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3|Sec-Fetch-Site: cross-site|Accept-Encoding: gzip, deflate|Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7|", iCookies, ref oCookies, ref oCode); try { string logName2 = Path.Combine(Service_Misc.GetExecutionPath(), "Searchlog.log"); File.WriteAllText(logName2, searchResultContent); } catch { } string logName = Path.Combine(Service_Misc.GetExecutionPath(), "GeneralDataBase.log"); string dataResultContent = ""; if (File.Exists(logName)) { dataResultContent = File.ReadAllText(logName); } if (dataResultContent == "") { dataResultContent = Service_Misc.RemoveIllegalCharacters(Service_Misc.GetContentFromRequest("GET http://garlandtools.org/db/doc/core/en/3/data.json HTTP/1.1|Host: garlandtools.org|Connection: keep-alive|Pragma: no-cache|Cache-Control: no-cache|Accept: application/json, text/javascript, */*; q=0.01|X-Requested-With: XMLHttpRequest|User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36|Referer: http://garlandtools.org/db/|Accept-Encoding: gzip, deflate|Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7|", iCookies, ref oCookies, ref oCode)); try { File.WriteAllText(logName, dataResultContent); } catch { } } try { JToken mainToken = JObject.Parse(searchResultContent); if (null == mainToken) { return(result); } JToken dataToken = JObject.Parse(dataResultContent); if (null == dataToken) { return(result); } JToken itemToken = mainToken["item"]; if (null == itemToken) { return(result); } JToken nodeToken = itemToken["nodes"]; if (null != nodeToken) { return(ReadGatheredNodes(iCookies, ref oCookies, ref oCode, dataToken, itemToken, nodeToken)); } } catch { } return(result); }
public static List <FFXIVSearchItem> Search(string iElemToSearch, System.Windows.Forms.TextBox iLogBox = null, FFXIVItem.TypeItem iType = FFXIVItem.TypeItem.Crafted, List <string> iJobs = null, int iMinLevel = 0, int iMaxLevel = 0) { Service_Misc.LogText(iLogBox, "Let me search this item for you : " + iElemToSearch); CookieCollection iCookies = new CookieCollection(); CookieCollection oCookies = new CookieCollection(); HttpStatusCode oCode = HttpStatusCode.NotFound; bool itemAdded = true; int pageNb = 0; List <FFXIVSearchItem> listItems = new List <FFXIVSearchItem>(); while (itemAdded) { itemAdded = false; string searchString = iElemToSearch.ToLower().Replace(" ", "+"); //http://garlandtools.org/api/search.php?lang=en&ilvlMax=5&craftable=1 string lvlMinString = ""; string lvlMaxString = ""; string category = ""; //if (iMinLevel > 0) lvlMinString = "&ilvlMin=" + iMinLevel; //if (iMaxLevel > 0) lvlMaxString = "&ilvlMax=" + iMaxLevel; if (iType == FFXIVItem.TypeItem.Crafted) { category = "&craftable=1"; } string searchResultContent = Service_Misc.GetContentFromRequest("GET http://garlandtools.org/api/search.php?text=" + searchString + "&lang=en&page=" + pageNb + lvlMinString + lvlMaxString + category + " HTTP/1.1|Host: garlandtools.org|Connection: keep-alive|Accept: application/json, text/javascript, */*; q=0.01|X-Requested-With: XMLHttpRequest|User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36|Referer: http://garlandtools.org/db/|Accept-Encoding: gzip, deflate|Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7|", iCookies, ref oCookies, ref oCode); pageNb++; string innerHTML = "{\"Result\":" + searchResultContent + "}"; JToken mainToken = null; try { mainToken = JObject.Parse(innerHTML); if (null == mainToken) { throw new Exception("Impossible de récupérer l'identifiant de connexion à partir du site"); } } catch (Exception) { continue; } JToken listToken = mainToken["Result"]; if (listToken.Count() > 0) { Service_Misc.LogText(iLogBox, "Hey I found some items !"); itemAdded = true; } else { Service_Misc.LogText(iLogBox, "Looks like there is no more items to find... (Page " + pageNb + ")"); return(listItems); } foreach (JToken childToken in listToken.Children()) { if (null == childToken) { continue; } string itemName = "Unknown Item"; JToken dataToken = childToken["obj"]; if (null != dataToken && null != dataToken["n"]) { itemName = dataToken["n"].Value <string>(); } string type = childToken["type"].Value <string>(); if (type != "item") { Service_Misc.LogText(iLogBox, "Found something but it ain't an item : " + itemName + " - " + type); continue; } try { FFXIVSearchItem item = new FFXIVSearchItem(); item.Name = itemName; item.UrlImage = "http://garlandtools.org/files/icons/item/" + dataToken["c"].Value <string>() + ".png"; item.UrlGarland = "http://garlandtools.org/db/#item/" + dataToken["i"].Value <string>(); if (dataToken["f"] != null && iType == FFXIVItem.TypeItem.Crafted) { string jobID = dataToken["f"][0]["job"].Value <string>(); string itemClass = GetJobName(jobID); string itemLevel = dataToken["f"][0]["lvl"].Value <string>(); int level = 0; int.TryParse(itemLevel, out level); if (iMinLevel > 0 && level < iMinLevel) { Service_Misc.LogText(iLogBox, "Found something but its level is under the requested min level : " + itemName + " - Level : " + itemLevel); continue; } if (iMaxLevel > 0 && level > iMaxLevel) { Service_Misc.LogText(iLogBox, "Found something but its level is over the requested max level : " + itemName + " - Level : " + itemLevel); continue; } if (null != iJobs && iJobs.Count > 0 && !iJobs.Contains(itemClass.ToUpper()) && !iJobs.Contains(itemClass.ToLower())) { Service_Misc.LogText(iLogBox, "Found something but its job is not in the requested list : " + itemName + " - Job : " + itemClass); continue; } item.Class = itemClass; item.Level = itemLevel; } else if (iType == FFXIVItem.TypeItem.Crafted) { Service_Misc.LogText(iLogBox, "Found something but it ain't for crafting : " + itemName); continue; } item.ID = childToken["id"].Value <string>(); Service_Misc.LogText(iLogBox, "Found this item : " + item.ToString()); listItems.Add(item); itemAdded = true; } catch (Exception exc) { Service_Misc.LogText(iLogBox, "Oh man, I failed to retrieve an item from the list : "); Service_Misc.LogText(iLogBox, itemName); Service_Misc.LogText(iLogBox, exc.Message); } } } listItems.Sort(); return(listItems); }