コード例 #1
0
		public void SetStructureCount(int structureTypeID, int count)
		{
			var entry = CelestialObjectStructures.SingleOrDefault(x => x.StructureTypeID == structureTypeID);
			if (entry == null) {
				entry = new CelestialObjectStructure();
				entry.StructureTypeID = structureTypeID;
				CelestialObjectStructures.Add(entry);
			}
			entry.Count = count;
			if (count == 0) CelestialObjectStructures.Remove(entry);
		}
コード例 #2
0
        public void SetStructureCount(int structureTypeID, int count)
        {
            var entry = CelestialObjectStructures.SingleOrDefault(x => x.StructureTypeID == structureTypeID);

            if (entry == null)
            {
                entry = new CelestialObjectStructure();
                entry.StructureTypeID = structureTypeID;
                CelestialObjectStructures.Add(entry);
            }
            entry.Count = count;
            if (count == 0)
            {
                CelestialObjectStructures.Remove(entry);
            }
        }
コード例 #3
0
		private void detach_CelestialObjectStructures(CelestialObjectStructure entity)
		{
			this.SendPropertyChanging();
			entity.StructureType = null;
		}
コード例 #4
0
 partial void DeleteCelestialObjectStructure(CelestialObjectStructure instance);
コード例 #5
0
 partial void InsertCelestialObjectStructure(CelestialObjectStructure instance);
コード例 #6
0
		private void attach_CelestialObjectStructures(CelestialObjectStructure entity)
		{
			this.SendPropertyChanging();
			entity.CelestialObject = this;
		}