public virtual void OnChanged(object sender, XmlConfigurationElementEventArgs e)
        {
            try
            {
                // no events during initialization or editing
                if (_isBeingInitialized /*|| _isBeingEdited */)
                {
                    return;
                }

                // are we ourselves changing? if not then our sub options and sub categories don't change us!!!
                if (string.Compare(this.Fullpath, e.Element.Fullpath, true) == 0)
                {
                    _hasChanges = true;
                }

                EventTracing.TraceMethodAndDelegate(this, this.Changed);

                if (this.Changed != null)
                {
                    this.Changed(sender, e);
                }
            }
            catch (System.Exception systemException)
            {
                System.Diagnostics.Trace.WriteLine(systemException);
            }
        }
        public void OnEditCancelled(object sender, XmlConfigurationElementEventArgs e)
        {
            try
            {
                EventTracing.TraceMethodAndDelegate(this, this.EditCancelled);

                if (this.EditCancelled != null)
                {
                    this.EditCancelled(sender, e);
                }
            }
            catch (System.Exception systemException)
            {
                System.Diagnostics.Trace.WriteLine(systemException);
            }
        }
Ejemplo n.º 3
0
        public void OnChanged(object sender, XmlConfigurationElementEventArgs e)
        {
            try
            {
                if (_isBeingInitialized)
                {
                    return;
                }

                _hasChanges = true;

                EventTracing.TraceMethodAndDelegate(this, this.Changed);

                if (this.Changed != null)
                {
                    this.Changed(sender, e);
                }
            }
            catch (System.Exception systemException)
            {
                System.Diagnostics.Trace.WriteLine(systemException);
            }
        }