internal void PrintedDeleteImage(object dicomPrintManger)
        {
            if (dicomPrintManger == null)
            {
                return;
            }
            DicomPrintManager manager = (DicomPrintManager)dicomPrintManger;

            if (!manager.IsPrintedDelete || _printImageViewerComponent == null)
            {
                return;
            }

            if (manager.IsAllPages)
            {
                if (_printImageViewerComponent != null)
                {
                    _printImageViewerComponent.ClearAllImages();
                }
            }
            else
            {
                EventsHelper.Fire(_printImageViewerComponent.EventBroker.DelegateDeleteCurrentPage, this, null);
            }
        }
        private void InitDicomPrint(
            IDesktopWindow deskTopWindow,
            List <ISelectPresentationsInformation> selectPresentations,
            int tilecount,
            bool isAllPages,
            bool isDelete)
        {
            try
            {
                if (_dicomPrintManager == null)
                {
                    _dicomPrintManager             = new DicomPrintManager(deskTopWindow, this);
                    _dicomPrintManager.CloseShelf += ClosePrintManager;
                }

                if (_dicomPrintManager.IsPrinting)
                {
                    DesktopWindow.ShowMessageBox("正在打印....,请稍后", MessageBoxActions.Ok);
                    return;
                }
                _dicomPrintManager.Show();
                _dicomPrintManager.Print(selectPresentations, this.DicomPrinter.Item, tilecount, isAllPages, isDelete);
            }
            catch (Exception exception)
            {
                ExceptionHandler.Report(exception, deskTopWindow);
            }
        }
 private void ClosePrintManager(object sender, EventArgs args)
 {
     if (_dicomPrintManager != null)
     {
         _dicomPrintManager.CloseShelf -= ClosePrintManager;
         _dicomPrintManager             = null;
     }
 }
 private void Dispose(bool flag)
 {
     if (flag)
     {
         if (_dicomPrintManager != null && _dicomPrintManager.ProgressShelf != null)
         {
             _dicomPrintManager.CloseShelf -= ClosePrintManager;
             _dicomPrintManager.ProgressShelf.Close(UserInteraction.Allowed);
             _dicomPrintManager = null;
         }
         _dicomPrinter = null;
         _dicomPrinterConfigurationEditorComponent = null;
         _desktopWindow = null;
     }
 }