private void DimensionStyleTextStyleChange(TableObject sender, TableObjectChangeEventArgs <TextStyle> e) { this.document.TextStyles.References[e.OldValue.Name].Remove(sender); e.NewValue = this.document.TextStyles.Add(e.NewValue); this.document.TextStyles.References[e.NewValue.Name].Add(sender); }
private void Block_LayerChange(Block sender, TableObjectChangeEventArgs <Layer> e) { this.document.Layers.References[e.OldValue.Name].Remove(sender); e.NewValue = this.document.Layers.Add(e.NewValue); this.document.Layers.References[e.NewValue.Name].Add(sender); }
private void ApplicationRegistry_NameChange(TableObject sender, TableObjectChangeEventArgs <string> e) { XData xdata = this.innerDictionary[e.OldValue]; this.innerDictionary.Remove(e.OldValue); this.innerDictionary.Add(e.NewValue, xdata); }
private void LayerLineTypeChange(TableObject sender, TableObjectChangeEventArgs <LineType> e) { this.document.LineTypes.References[e.OldValue.Name].Remove(sender); e.NewValue = this.document.LineTypes.Add(e.NewValue); this.document.LineTypes.References[e.NewValue.Name].Add(sender); }
protected virtual TextStyle OnTextStyleChangeEvent(TextStyle oldTextStyle, TextStyle newTextStyle) { TextStyleChangeEventHandler ae = this.TextStyleChange; if (ae != null) { TableObjectChangeEventArgs<TextStyle> eventArgs = new TableObjectChangeEventArgs<TextStyle>(oldTextStyle, newTextStyle); ae(this, eventArgs); return eventArgs.NewValue; } return newTextStyle; }
protected virtual LineType OnLineTypeChangeEvent(LineType oldLineType, LineType newLineType) { LineTypeChangeEventHandler ae = this.LineTypeChange; if (ae != null) { TableObjectChangeEventArgs<LineType> eventArgs = new TableObjectChangeEventArgs<LineType>(oldLineType, newLineType); ae(this, eventArgs); return eventArgs.NewValue; } return newLineType; }
protected virtual MLineStyle OnMLineStyleChangeEvent(MLineStyle oldMLineStyle, MLineStyle newMLineStyle) { MLineStyleChangeEventHandler ae = this.MLineStyleChange; if (ae != null) { TableObjectChangeEventArgs<MLineStyle> eventArgs = new TableObjectChangeEventArgs<MLineStyle>(oldMLineStyle, newMLineStyle); ae(this, eventArgs); return eventArgs.NewValue; } return newMLineStyle; }
protected virtual Block OnDimensionBlockChangeEvent(Block oldBlock, Block newBlock) { DimensionBlockChangeEventHandler ae = this.DimensionBlockChange; if (ae != null) { TableObjectChangeEventArgs<Block> eventArgs = new TableObjectChangeEventArgs<Block>(oldBlock, newBlock); ae(this, eventArgs); return eventArgs.NewValue; } return newBlock; }
protected virtual DimensionStyle OnDimensionStyleChangeEvent(DimensionStyle oldStyle, DimensionStyle newStyle) { DimensionStyleChangeEventHandler ae = this.DimensionStyleChange; if (ae != null) { TableObjectChangeEventArgs<DimensionStyle> eventArgs = new TableObjectChangeEventArgs<DimensionStyle>(oldStyle, newStyle); ae(this, eventArgs); return eventArgs.NewValue; } return newStyle; }
protected virtual Layer OnLayerChangeEvent(Layer oldLayer, Layer newLayer) { LayerChangeEventHandler ae = this.LayerChange; if (ae != null) { TableObjectChangeEventArgs<Layer> eventArgs = new TableObjectChangeEventArgs<Layer>(oldLayer, newLayer); ae(this, eventArgs); return eventArgs.NewValue; } return newLayer; }
protected virtual Layer OnLayerChangeEvent(Layer oldLayer, Layer newLayer) { LayerChangeEventHandler ae = this.LayerChange; if (ae != null) { TableObjectChangeEventArgs <Layer> eventArgs = new TableObjectChangeEventArgs <Layer>(oldLayer, newLayer); ae(this, eventArgs); return(eventArgs.NewValue); } return(newLayer); }
protected virtual LineType OnLineTypeChangeEvent(LineType oldLineType, LineType newLineType) { LineTypeChangeEventHandler ae = this.LineTypeChange; if (ae != null) { TableObjectChangeEventArgs <LineType> eventArgs = new TableObjectChangeEventArgs <LineType>(oldLineType, newLineType); ae(this, eventArgs); return(eventArgs.NewValue); } return(newLineType); }
protected virtual MLineStyle OnMLineStyleChangeEvent(MLineStyle oldMLineStyle, MLineStyle newMLineStyle) { MLineStyleChangeEventHandler ae = this.MLineStyleChange; if (ae != null) { TableObjectChangeEventArgs <MLineStyle> eventArgs = new TableObjectChangeEventArgs <MLineStyle>(oldMLineStyle, newMLineStyle); ae(this, eventArgs); return(eventArgs.NewValue); } return(newMLineStyle); }
protected virtual DimensionStyle OnDimensionStyleChangeEvent(DimensionStyle oldStyle, DimensionStyle newStyle) { DimensionStyleChangeEventHandler ae = this.DimensionStyleChange; if (ae != null) { TableObjectChangeEventArgs <DimensionStyle> eventArgs = new TableObjectChangeEventArgs <DimensionStyle>(oldStyle, newStyle); ae(this, eventArgs); return(eventArgs.NewValue); } return(newStyle); }
protected virtual Block OnDimensionBlockChangeEvent(Block oldBlock, Block newBlock) { DimensionBlockChangeEventHandler ae = this.DimensionBlockChange; if (ae != null) { TableObjectChangeEventArgs <Block> eventArgs = new TableObjectChangeEventArgs <Block>(oldBlock, newBlock); ae(this, eventArgs); return(eventArgs.NewValue); } return(newBlock); }
protected virtual TextStyle OnTextStyleChangeEvent(TextStyle oldTextStyle, TextStyle newTextStyle) { TextStyleChangeEventHandler ae = this.TextStyleChange; if (ae != null) { TableObjectChangeEventArgs <TextStyle> eventArgs = new TableObjectChangeEventArgs <TextStyle>(oldTextStyle, newTextStyle); ae(this, eventArgs); return(eventArgs.NewValue); } return(newTextStyle); }
private void DimensionStyleBlockChange(TableObject sender, TableObjectChangeEventArgs <Block> e) { if (e.OldValue != null) { this.document.Blocks.References[e.OldValue.Name].Remove(sender); } e.NewValue = this.document.Blocks.Add(e.NewValue); if (e.NewValue != null) { this.document.Blocks.References[e.NewValue.Name].Add(sender); } }
private void Item_NameChange(TableObject sender, TableObjectChangeEventArgs <string> e) { if (this.Contains(e.NewValue)) { throw new ArgumentException("There is already another text style with the same name."); } this.list.Remove(sender.Name); this.list.Add(e.NewValue, (TextStyle)sender); List <DxfObject> refs = this.references[sender.Name]; this.references.Remove(sender.Name); this.references.Add(e.NewValue, refs); }
private void Dimension_DimStyleChange(Dimension sender, TableObjectChangeEventArgs<DimensionStyle> e) { this.dimStyles.References[e.OldValue.Name].Remove(sender); e.NewValue = this.dimStyles.Add(e.NewValue); this.dimStyles.References[e.NewValue.Name].Add(sender); }
private void Entity_TextStyleChange(DxfObject sender, TableObjectChangeEventArgs<TextStyle> e) { this.textStyles.References[e.OldValue.Name].Remove(sender); e.NewValue = this.textStyles.Add(e.NewValue); this.textStyles.References[e.NewValue.Name].Add(sender); }
private void MLine_MLineStyleChange(MLine sender, TableObjectChangeEventArgs<MLineStyle> e) { this.mlineStyles.References[e.OldValue.Name].Remove(sender); e.NewValue = this.mlineStyles.Add(e.NewValue); this.mlineStyles.References[e.NewValue.Name].Add(sender); }
void MLineStyleElement_LineTypeChange(MLineStyleElement sender, TableObjectChangeEventArgs <LineType> e) { e.NewValue = this.OnMLineStyleElementLineTypeChangeEvent(e.OldValue, e.NewValue); }
private void Dimension_DimBlockChange(Dimension sender, TableObjectChangeEventArgs<Block> e) { this.blocks.References[e.OldValue.Name].Remove(sender); this.blocks.Remove(e.OldValue); e.NewValue = this.blocks.Add(e.NewValue); this.blocks.References[e.NewValue.Name].Add(sender); }
private void Entity_LineTypeChange(DxfObject sender, TableObjectChangeEventArgs<LineType> e) { this.lineTypes.References[e.OldValue.Name].Remove(sender); e.NewValue = this.lineTypes.Add(e.NewValue); this.lineTypes.References[e.NewValue.Name].Add(sender); }
void MLineStyleElement_LineTypeChange(MLineStyleElement sender, TableObjectChangeEventArgs<LineType> e) { e.NewValue = this.OnMLineStyleElementLineTypeChangeEvent(e.OldValue, e.NewValue); }