/// <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); } }
/// <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); } }
// ------------------ _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); } }
protected override void OnStoreContentChanged(StoreContentChangedEventArgs e) { }
/// <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; } }
protected virtual new void OnStoreContentChanged(StoreContentChangedEventArgs e) { }
private void AnnotationStore_StoreContentChanged(object sender, StoreContentChangedEventArgs e) { // Bind to refreshed annotations store BindToAnnotations(_store.GetAnnotations()); }