예제 #1
0
        /// <summary>
        /// Called after the GUI toolkit message loop terminates, to clean up the application.  Override
        /// this method to perform custom clean-up.  Be sure to call the base class method.
        /// </summary>
        protected virtual void CleanUp()
        {
            _synchronizationContext = null;
            if (_view != null && _view is IDisposable)
            {
                (_view as IDisposable).Dispose();
                _view = null;
            }

            if (_toolSet != null)
            {
                _toolSet.Dispose();
                _toolSet = null;
            }

            if (_windows != null)
            {
                (_windows as IDisposable).Dispose();
            }

            if (_guiToolkit != null && _guiToolkit is IDisposable)
            {
                (_guiToolkit as IDisposable).Dispose();
            }
        }
        /// <summary>
        /// Clean up the component.
        /// </summary>
        public override void Stop()
        {
            // important to dispose of extension tools
            _extensionTools.Dispose();

            // important to unsubscribe from this event, or the DesktopWindow will continue to hold a reference to this component
            this.Host.DesktopWindow.Workspaces.ItemActivationChanged -= Workspaces_ItemActivationChanged;

            base.Stop();
        }
예제 #3
0
        /// <summary>
        /// Called by the host when the application component is being terminated.
        /// </summary>
        /// <remarks>
        /// Override this method to implement custom termination logic.  Overrides must be sure to call the base implementation.
        /// </remarks>
        public virtual void Stop()
        {
            AssertStarted();

            if (_toolSet != null)
            {
                _toolSet.Dispose();
                _toolSet = null;
            }

            _isStarted = false;

            EventsHelper.Fire(_stopped, this, EventArgs.Empty);
        }
        public override void Stop()
        {
            Async.CancelPending(this);

            foreach (var searchResult in _searchResults.Values)
            {
                searchResult.Dispose();
            }

            _toolSet.Dispose();
            _toolSet = null;

            DicomExplorerConfigurationSettings.Default.PropertyChanged -= OnConfigurationSettingsChanged;

            base.Stop();
        }
        public override void Stop()
        {
            if (_contentComponentHost != null)
            {
                _contentComponentHost.StopComponent();
                _contentComponentHost = null;
            }

            if (_bannerComponentHost != null)
            {
                _bannerComponentHost.StopComponent();
                _bannerComponentHost = null;
            }

            _toolSet.Dispose();
            base.Stop();
        }
예제 #6
0
        /// <summary>
        /// Implementation of the <see cref="IDisposable"/> pattern
        /// </summary>
        /// <param name="disposing">True if this object is being disposed, false if it is being finalized</param>
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                ParentDesktopObject = null;

                if (_toolSet != null)
                {
                    _toolSet.Dispose();
                    _toolSet = null;
                }

                StopLoadingPriors();
                StopPrefetching();

                if (_physicalWorkspace != null)
                {
                    _physicalWorkspace.Dispose();
                    _physicalWorkspace = null;
                }

                if (_logicalWorkspace != null)
                {
                    _logicalWorkspace.Dispose();
                    _logicalWorkspace = null;
                }

                if (_studyTree != null)
                {
                    _studyTree.Dispose();
                    _studyTree = null;
                }

                if (_layoutManager != null)
                {
                    _layoutManager.Dispose();
                    _layoutManager = null;
                }

                if (ExtensionData != null)
                {
                    ExtensionData.Dispose();
                    ExtensionData = null;
                }
            }
        }
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_toolSet != null)
                {
                    _toolSet.Dispose();
                    _toolSet = null;
                }

                if (_studyTree != null)
                {
                    _studyTree.Dispose();
                    _studyTree = null;
                }

                if (DicomPrintComponent != null)
                {
                    DicomPrintComponent.Dispose();
                }
                referenceLines.Clear();
                referenceLines = null;

                if (this.DisplaySet != null && this.DisplaySet.PresentationImages != null)
                {
                    foreach (var selectPresentationImage in this.DisplaySet.PresentationImages)
                    {
                        selectPresentationImage.Dispose();
                    }
                    DisplaySet.PresentationImages.Clear();
                }

                if (_rootImageBox != null)
                {
                    _rootImageBox.Dispose();
                }

                PrintPresentationImagesHost.ImageViewerComponent = null;
            }
        }
예제 #8
0
        public override void Stop()
        {
            if (_toolSet != null)
            {
                _toolSet.Dispose();
                _toolSet = null;
            }

            if (_stackTabComponentContainerHost != null)
            {
                _stackTabComponent.CurrentPageChanged -= OnCurrentPageChanged;
                _stackTabComponentContainerHost.StopComponent();
                _stackTabComponentContainerHost = null;
            }

            // un-register folder system instances with document manager
            foreach (var folderSystem in _folderSystems)
            {
                DocumentManager.UnregisterFolderSystem(folderSystem);
            }

            base.Stop();
        }
 public override void Stop()
 {
     _toolSet.Dispose();
     base.Stop();
 }
 public override void Stop()
 {
     base.Stop();
     ToolSet.Dispose();
     ToolSet = null;
 }
예제 #11
0
 protected override void Dispose(bool disposing)
 {
     _toolSet.Dispose();
     base.Dispose(disposing);
 }