예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
 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;
 }
예제 #6
0
 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;
 }
예제 #7
0
 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;
 }
예제 #8
0
 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;
 }
예제 #9
0
 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;
 }
예제 #10
0
 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;
 }
예제 #11
0
        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);
        }
예제 #12
0
        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);
        }
예제 #13
0
        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);
        }
예제 #14
0
        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);
        }
예제 #15
0
        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);
        }
예제 #16
0
        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);
        }
예제 #17
0
        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);
            }
        }
예제 #18
0
        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);
        }
예제 #19
0
        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);
        }
예제 #20
0
        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);
        }
예제 #21
0
        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);
        }
예제 #22
0
 void MLineStyleElement_LineTypeChange(MLineStyleElement sender, TableObjectChangeEventArgs <LineType> e)
 {
     e.NewValue = this.OnMLineStyleElementLineTypeChangeEvent(e.OldValue, e.NewValue);
 }
예제 #23
0
        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);
        }
예제 #24
0
        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);
        }
예제 #25
0
 void MLineStyleElement_LineTypeChange(MLineStyleElement sender, TableObjectChangeEventArgs<LineType> e)
 {
     e.NewValue = this.OnMLineStyleElementLineTypeChangeEvent(e.OldValue, e.NewValue);
 }