Пример #1
0
        internal bool NotifyChanging(object sender, XObjectChangeEventArgs e)
        {
            bool    notify = false;
            XObject o      = this;

            while (true)
            {
                while (o != null && o.annotations == null)
                {
                    o = o.parent;
                }
                if (o == null)
                {
                    break;
                }
                XObjectChangeAnnotation a = o.Annotation <XObjectChangeAnnotation>();
                if (a != null)
                {
                    notify = true;
                    if (a.changing != null)
                    {
                        a.changing(sender, e);
                    }
                }
                o = o.parent;
            }
            return(notify);
        }
Пример #2
0
        internal bool SkipNotify()
        {
            XObject o = this;

            while (true)
            {
                while (o != null && o.annotations == null)
                {
                    o = o.parent;
                }
                if (o == null)
                {
                    return(true);
                }
                if (o.Annotation <XObjectChangeAnnotation>() != null)
                {
                    return(false);
                }
                o = o.parent;
            }
        }