Ejemplo n.º 1
0
        /// <summary>
        ///     Called after every annotation action on the store.  We override it
        ///     to update the dirty state of the store.
        /// </summary>
        /// <param name="e">arguments for the event to fire</param>
        protected override void OnStoreContentChanged(StoreContentChangedEventArgs e)
        {
            lock (SyncRoot)
            {
                _dirty = true;
            }

            base.OnStoreContentChanged(e);
        }
        // Token: 0x06006379 RID: 25465 RVA: 0x001BF964 File Offset: 0x001BDB64
        protected override void OnStoreContentChanged(StoreContentChangedEventArgs e)
        {
            object syncRoot = base.SyncRoot;

            lock (syncRoot)
            {
                this._dirty = true;
            }
            base.OnStoreContentChanged(e);
        }
        /// <summary>Raises the <see cref="E:System.Windows.Annotations.Storage.AnnotationStore.StoreContentChanged" /> event.</summary>
        /// <param name="e">The event data.</param>
        // Token: 0x06006360 RID: 25440 RVA: 0x001BF288 File Offset: 0x001BD488
        protected virtual void OnStoreContentChanged(StoreContentChangedEventArgs e)
        {
            StoreContentChangedEventHandler storeContentChangedEventHandler = null;
            object syncRoot = this.SyncRoot;

            lock (syncRoot)
            {
                storeContentChangedEventHandler = this.StoreContentChanged;
            }
            if (this.AutoFlush)
            {
                this.Flush();
            }
            if (storeContentChangedEventHandler != null)
            {
                storeContentChangedEventHandler(this, e);
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        ///     Should be called after every operation in order to trigger
        ///     events and to perform an automatic flush if AutoFlush is true.
        /// </summary>
        /// <param name="e">arguments for the event to fire</param>
        protected virtual void OnStoreContentChanged(StoreContentChangedEventArgs e)
        {
            StoreContentChangedEventHandler storeContentChanged = null;

            lock (SyncRoot)
            {
                storeContentChanged = StoreContentChanged;
            }

            if (AutoFlush)
            {
                Flush();
            }

            if (storeContentChanged != null)
            {
                storeContentChanged(this, e);
            }
        }
Ejemplo n.º 5
0
 // ------------------ _annStore_StoreContentChanged -------------------
 void _annStore_StoreContentChanged(object sender, StoreContentChangedEventArgs e)
 {
     if (e.Action == StoreContentAction.Deleted) return;
     Annotation ann = e.Annotation;
     if (ann.Cargos.Count > 0)
     {
         AnnotationResource annResource = ann.Cargos[0] as AnnotationResource;
         if (annResource.Name == "Highlight")
             AddBookmarkOrComment(BookmarkList, ann);
         else
             AddBookmarkOrComment(CommentsList, ann);
     }
     else
     {
         AddBookmarkOrComment(CommentsList, ann);
     }
 }
        /// <summary>
        ///     Should be called after every operation in order to trigger 
        ///     events and to perform an automatic flush if AutoFlush is true.       
        /// </summary>
        /// <param name="e">arguments for the event to fire</param>
        protected virtual void OnStoreContentChanged(StoreContentChangedEventArgs e)
        {
            StoreContentChangedEventHandler storeContentChanged = null;

            lock (SyncRoot)
            {
                storeContentChanged = StoreContentChanged;
            }

            if (AutoFlush)
            {
                Flush();
            }

            if (storeContentChanged != null)
            {
                storeContentChanged(this, e);
            }
        }
 protected override void OnStoreContentChanged(StoreContentChangedEventArgs e)
 {
 }
Ejemplo n.º 8
0
        /// <summary>
        ///     Called to handle updates to the annotation store.  We handle additions, deletions,
        ///     and certain kinds of modifications(e.g., if an annotation gets a new Context we must
        ///     calculate the anchor for that context).  Updates to content will be handled by
        ///     individual components.
        /// </summary>
        /// <param name="node">the store that was updated</param>
        /// <param name="args">args describing the update to the store</param>
        private void OnStoreContentChanged(object node, StoreContentChangedEventArgs args)
        {
            VerifyAccess();

            switch (args.Action)
            {
                case StoreContentAction.Added:
                    AnnotationAdded(args.Annotation);
                    break;

                case StoreContentAction.Deleted:
                    AnnotationDeleted(args.Annotation.Id);
                    break;

                default:
                    Invariant.Assert(false, "Unknown StoreContentAction.");
                    break;
            }
        }
Ejemplo n.º 9
0
        /// <summary> 
        ///     Called after every annotation action on the store.  We override it
        ///     to update the dirty state of the store. 
        /// </summary> 
        /// <param name="e">arguments for the event to fire</param>
        protected override void OnStoreContentChanged(StoreContentChangedEventArgs e) 
        {
            lock (SyncRoot)
            {
                _dirty = true; 
            }
 
            base.OnStoreContentChanged(e); 
        }
 protected virtual new void OnStoreContentChanged(StoreContentChangedEventArgs e)
 {
 }
 protected virtual new void OnStoreContentChanged(StoreContentChangedEventArgs e)
 {
 }
 protected override void OnStoreContentChanged(StoreContentChangedEventArgs e)
 {
 }
Ejemplo n.º 13
0
 private void AnnotationStore_StoreContentChanged(object sender, StoreContentChangedEventArgs e)
 {
     // Bind to refreshed annotations store
     BindToAnnotations(_store.GetAnnotations());
 }