Пример #1
0
        private void OnAttributeChanged(AttributeChangedEventArgs args)
        {
            AttributeChangedEventHandler handler = this.AttributeChanged;

            if (handler != null)
            {
                handler(this, args);
            }
        }
Пример #2
0
        void IMapShape.SetAttribute(string key, object value)
        {
            if (this.attributes == null || string.IsNullOrEmpty(key))
            {
                return;
            }

            var oldValue = (this as IMapShape).GetAttribute(key);

            if (oldValue != value)
            {
                this.attributes[key] = value;
                AttributeChangedEventArgs args = new AttributeChangedEventArgs(key, oldValue, value);
                this.OnAttributeChanged(args);
            }
        }