Example #1
0
        protected virtual void OnNameChangeEvent(string oldName, string newName)
        {
            NameChangeEventHandler ae = this.NameChange;

            if (ae != null)
            {
                TableObjectChangeEventArgs <string> eventArgs = new TableObjectChangeEventArgs <string>(oldName, newName);
                ae(this, eventArgs);
            }
        }
Example #2
0
        protected virtual Block OnBlockChangeEvent(Block oldBlock, Block newBlock)
        {
            BlockChangeEventHandler ae = this.BlockChange;

            if (ae != null)
            {
                TableObjectChangeEventArgs <Block> eventArgs = new TableObjectChangeEventArgs <Block>(this.dimblk, newBlock);
                ae(this, eventArgs);
                return(eventArgs.NewValue);
            }
            return(newBlock);
        }
Example #3
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);
        }
Example #4
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);
        }