private void Insert_AttributeRemoved(Insert sender, AttributeChangeEventArgs e) { this.layers.References[e.Item.Layer.Name].Remove(e.Item); e.Item.LayerChanged += this.Entity_LayerChanged; this.linetypes.References[e.Item.Linetype.Name].Remove(e.Item); e.Item.LinetypeChanged -= this.Entity_LinetypeChanged; this.textStyles.References[e.Item.Style.Name].Remove(e.Item); e.Item.TextStyleChanged += this.Entity_TextStyleChanged; }
private void Insert_AttributeAdded(Insert sender, AttributeChangeEventArgs e) { this.NumHandles = e.Item.AsignHandle(this.NumHandles); e.Item.Layer = this.layers.Add(e.Item.Layer); this.layers.References[e.Item.Layer.Name].Add(e.Item); e.Item.LayerChanged += this.Entity_LayerChanged; e.Item.Linetype = this.linetypes.Add(e.Item.Linetype); this.linetypes.References[e.Item.Linetype.Name].Add(e.Item); e.Item.LinetypeChanged -= this.Entity_LinetypeChanged; e.Item.Style = this.textStyles.Add(e.Item.Style); this.textStyles.References[e.Item.Style.Name].Add(e.Item); e.Item.TextStyleChanged += this.Entity_TextStyleChanged; }