Пример #1
0
        /// <summary>
        /// recursively add the parent groups of the specified group id to the given table.
        /// </summary>
        /// <param name="table"></param>
        /// <param name="groupID"></param>
        private static void AddGroupParents(EveDataSet.invMarketGroupsDataTable table, int groupID)
        {
            EveDataSet.invMarketGroupsRow group = table.FindBymarketGroupID(groupID);
            if (group == null)
            {
                EveDataSet.invMarketGroupsDataTable resultTable = new EveDataSet.invMarketGroupsDataTable();
                tableAdapter.FillByID(resultTable, groupID);
                table.ImportRow(resultTable[0]);
                group = table.FindBymarketGroupID(groupID);
            }

            if (!group.IsparentGroupIDNull())
            {
                AddGroupParents(table, group.parentGroupID);
            }
        }
 /// <summary>
 /// Load the data for the specified route into the specified data table
 /// </summary>
 /// <param name="startSystem"></param>
 /// <param name="endSystem"></param>
 /// <param name="distances"></param>
 private static void LoadDistanceData(int startSystem, int endSystem, 
     EveDataSet.SolarSystemDistancesDataTable distances)
 {
     lock (tableAdapter)
     {
         try
         {
             tableAdapter.FillByIDs(distances, startSystem, endSystem);
         }
         catch (Exception ex)
         {
             throw new EMMADataException(ExceptionSeverity.Critical, "Problem loading distance " +
                 "data from the EMMA database. (" + SolarSystems.GetSystemName(startSystem) +
                 " -> " + SolarSystems.GetSystemName(endSystem) + ")", ex);
         }
     }
 }
Пример #3
0
 private static void SetWormholeRegionNames(ref EveDataSet.mapRegionsDataTable table)
 {
     foreach (EveDataSet.mapRegionsRow region in table)
     {
         // Add region ID to wormhole regions
         if (region.regionName.Trim().ToUpper().Equals("UNKNOWN"))
         {
             region.regionName = "Unknown (" + region.regionID + ")";
         }
     }
 }