Example #1
0
        internal static void OnViewerClosed(IImageViewer viewer)
        {
            KeyImageInformation info = GetKeyImageInformation(viewer);

            KeyImageInformation.Remove(viewer);

            if (info != null)
            {
                using (info)
                {
                    try
                    {
                        var publisher = new KeyImagePublisher(info);
                        publisher.Publish();
                    }
                    catch (Exception e)
                    {
                        //Should never happen because KeyImagePublisher.Publish doesn't throw exceptions.
                        ExceptionHandler.Report(e, Application.ActiveDesktopWindow);
                    }
                }
            }

            ManageActivityMonitorConnection();
        }