コード例 #1
0
        /// <summary>
        ///     Should be called when any annotation's author changes.
        ///     This will fire the AuthorChanged event and cause a flush
        ///     if AutoFlush is true.
        /// </summary>
        /// <param name="args">the args for the event</param>
        protected virtual void OnAuthorChanged(AnnotationAuthorChangedEventArgs args)
        {
            AnnotationAuthorChangedEventHandler authorChanged = null;

            // Ignore null authors added to an annotation
            if (args.Author == null)
            {
                return;
            }

            lock (SyncRoot)
            {
                authorChanged = AuthorChanged;
            }

            if (AutoFlush)
            {
                Flush();
            }

            if (authorChanged != null)
            {
                authorChanged(this, args);
            }
        }
コード例 #2
0
        /// <summary>
        ///     Used as AuthorChanged event handler for all annotations
        ///     handed out by the map.
        /// </summary>
        /// <param name="sender">annotation that sent the event</param>
        /// <param name="e">args for the event</param>
        private void HandleAuthorChanged(object sender, AnnotationAuthorChangedEventArgs e)
        {
            lock (SyncRoot)
            {
                _dirty = true;
            }

            OnAuthorChanged(e);
        }
コード例 #3
0
        // Token: 0x0600637B RID: 25467 RVA: 0x001BFB08 File Offset: 0x001BDD08
        private void HandleAuthorChanged(object sender, AnnotationAuthorChangedEventArgs e)
        {
            object syncRoot = base.SyncRoot;

            lock (syncRoot)
            {
                this._dirty = true;
            }
            this.OnAuthorChanged(e);
        }
コード例 #4
0
        /// <summary>Raises the <see cref="E:System.Windows.Annotations.Storage.AnnotationStore.AuthorChanged" /> event.</summary>
        /// <param name="args">The event data.</param>
        // Token: 0x0600635D RID: 25437 RVA: 0x001BF150 File Offset: 0x001BD350
        protected virtual void OnAuthorChanged(AnnotationAuthorChangedEventArgs args)
        {
            AnnotationAuthorChangedEventHandler annotationAuthorChangedEventHandler = null;

            if (args.Author == null)
            {
                return;
            }
            object syncRoot = this.SyncRoot;

            lock (syncRoot)
            {
                annotationAuthorChangedEventHandler = this.AuthorChanged;
            }
            if (this.AutoFlush)
            {
                this.Flush();
            }
            if (annotationAuthorChangedEventHandler != null)
            {
                annotationAuthorChangedEventHandler(this, args);
            }
        }
コード例 #5
0
 // Token: 0x06007BC4 RID: 31684 RVA: 0x0022C506 File Offset: 0x0022A706
 private void OnAuthorChanged(object sender, AnnotationAuthorChangedEventArgs args)
 {
     this._currentAnnotations[args.Annotation.Id].Dirty = true;
     this._authorChanged(sender, args);
 }