protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                _annotationDictionary.Clear();
                ImageViewer.EventBroker.DisplaySetChanged -= OnDisplaySetChanged;
            }

            base.Dispose(disposing);
        }
Example #2
0
        /// <summary>
        /// Called when the tool is disposed.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                // TODO - Save new annotations here?

                _annotationDictionary.Clear();

                _localDataStoreEventBroker.SopInstanceImported   -= OnSopInstanceImported;
                _localDataStoreEventBroker.InstanceDeleted       -= OnInstanceDeleted;
                _localDataStoreEventBroker.LocalDataStoreCleared -= OnLocalDataStoreCleared;
                _localDataStoreEventBroker.Dispose();

                // this.ImageViewer.EventBroker.TileSelected -= OnTileSelected;
                this.ImageViewer.EventBroker.DisplaySetChanged -= OnDisplaySetChanged;
            }

            base.Dispose(disposing);
        }