internal PrintImageViewerControl(PrintImageViewerComponent component) { _component = component; InitializeComponent(); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); _component.Closing += new EventHandler(OnComponentClosing); _component.Drawing += new EventHandler(OnPhysicalWorkspaceDrawing); _component.LayoutCompleted += new EventHandler(OnLayoutCompleted); _component.ScreenRectangleChanged += new EventHandler(OnScreenRectangleChanged); _delayedEventPublisher = new DelayedEventPublisher(OnRecalculateImageBoxes, 50); #region ��ӡ������ printComponent = _component.DicomPrintComponent as DicomPrintComponent; if (printComponent != null) { FilmSize fileSize = printComponent.DicomPrinterConfigurationEditorComponent.FilmSize.ToFilmSize(); FilmOrientation filmOrientation = printComponent.DicomPrinterConfigurationEditorComponent.FilmOrientation; _component.Layout(fileSize, filmOrientation); this.Load += Loaded; } #endregion #region �˵������� this.ToolbarModel = _component.ToolbarModel; this.ContextMenuModel = component.ContextMenuModel; #endregion FilmCount.DataBindings.Add("Text", _component, "FilmCount", true, DataSourceUpdateMode.OnPropertyChanged); ImageCount.DataBindings.Add("Text", _component, "ImageCount", true, DataSourceUpdateMode.OnPropertyChanged); }
public DicomPrintManager(IDesktopWindow desktopWindow, DicomPrintComponent dicomPrintComponent) { _desktopWindow = desktopWindow; _task = new BackgroundTask(DoPrint, true); _task.ThreadUICulture = Application.CurrentUICulture; _context = SynchronizationContext.Current; _progressDialog = new ProgressDialogComponentForPrint(_task, false, ProgressBarStyle.Marquee); _desktopWindow.Closing += this.DesktopWindowsClose; _task.Terminated += TaskTerminated; _dicomPrintComponent = dicomPrintComponent; }
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; } }