void SEntity_EntityCreated(object sender, EventArgs e) { if (this.m_loading) { return; } this.m_lastid++; SEntity entity = (SEntity)sender; entity.OID = this.m_lastid; this.m_instances.Add(entity.OID, entity); }