Example #1
0
        /// <summary>
        /// Called when the cache requires a region name to be read from the database
        /// </summary>
        /// <param name="myObject"></param>
        /// <param name="args"></param>
        static void NameCache_DataUpdateNeeded(object myObject, DataUpdateNeededArgs<long, string> args)
        {
            string name = "";

            lock (regionsTableAdapter)
            {
                EveDataSet.mapRegionsDataTable table = new EveDataSet.mapRegionsDataTable();
                regionsTableAdapter.FillByIDs(table, args.Key.ToString());
                if (table.Count > 0)
                {
                    name = table[0].regionName;
                }
            }

            if (name.Equals(""))
            {
                name = "Unknown Region (" + args.Key + ")";
            }
            // Add region ID to wormhole regions
            if (name.Trim().ToUpper().Equals("UNKNOWN"))
            {
                name = "Unknown (" + args.Key + ")";
            }

            args.Data = name;
        }
Example #2
0
 public static EveDataSet.mapRegionsDataTable GetAllRegions()
 {
     EveDataSet.mapRegionsDataTable retVal = new EveDataSet.mapRegionsDataTable();
     regionsTableAdapter.Fill(retVal);
     Regions.SetWormholeRegionNames(ref retVal);
     return retVal;
 }
Example #3
0
 public static EveDataSet.mapRegionsDataTable GetAssetRegions(List<AssetAccessParams> accessList,
     int itemID)
 {
     StringBuilder regionIDs = new StringBuilder("");
     EMMADataSet.IDTableDataTable idTable = Assets.GetInvolvedRegionIDs(accessList, itemID);
     foreach (EMMADataSet.IDTableRow id in idTable)
     {
         regionIDs.Append(" ");
         regionIDs.Append(id.ID);
     }
     EveDataSet.mapRegionsDataTable retVal = new EveDataSet.mapRegionsDataTable();
     lock (regionsTableAdapter)
     {
         regionsTableAdapter.FillByIDs(retVal, regionIDs.ToString());
     }
     Regions.SetWormholeRegionNames(ref retVal);
     return retVal;
 }