public static Dictionary <string, ModuleData> GetAllModules() { Dictionary <string, ModuleData> Data = new Dictionary <string, ModuleData>(); ModuleImport Importer = WGAPI.GetModules(); if (Importer.Status.Equals("ok")) { int Pages = Importer.MetaInfo.Pages; foreach (KeyValuePair <string, ModuleData> ModData in Importer.Data) { Data.Add(ModData.Key, ModData.Value); } if (Pages > 1) { for (int Counter = 2; Counter <= Pages; Counter++) { Importer = WGAPI.GetModules(Counter); if (Importer.Status.Equals("ok")) { foreach (KeyValuePair <string, ModuleData> ModData in Importer.Data) { Data.Add(ModData.Key, ModData.Value); } } } } } return(Data); }
public static List <Ship> GetAllShipsFromWG() { List <Ship> AllShips = new List <Ship>(); ShipImporter Importer = WGAPI.GetShipData(); if (Importer.Status.Equals("ok")) { int Pages = Importer.MetaInfo.Pages; foreach (KeyValuePair <string, Ship> ShipData in Importer.ShipData) { AllShips.Add(ShipData.Value); } if (Pages > 1) { for (int Counter = 2; Counter <= Pages; Counter++) { Importer = WGAPI.GetShipData(Counter); if (Importer.Status.Equals("ok")) { foreach (KeyValuePair <string, Ship> ShipData in Importer.ShipData) { AllShips.Add(ShipData.Value); } } } } } return(AllShips); }