protected override void OnActiveImageViewerChanging(ActiveImageViewerChangedEventArgs e) { if (e.DeactivatedImageViewer != null) { e.DeactivatedImageViewer.EventBroker.TileSelected -= OnTileSelected; e.DeactivatedImageViewer.EventBroker.MouseCaptureChanged -= OnMouseCaptureChanged; e.DeactivatedImageViewer.EventBroker.GraphicSelectionChanged -= OnGraphicSelectionChanged; } }
protected override void OnActiveImageViewerChanging(ActiveImageViewerChangedEventArgs e) { // Remove update event handlers if (e.DeactivatedImageViewer != null) { //e.DeactivatedImageViewer.EventBroker.PresentationImageSelected -= OnPresentationImageSelected; e.DeactivatedImageViewer.EventBroker.TileSelected -= OnTileSelected; e.DeactivatedImageViewer.EventBroker.MouseCaptureChanged -= OnMouseCaptureChanged; } }
protected override void OnActiveImageViewerChanged(ActiveImageViewerChangedEventArgs e) { if (e.ActivatedImageViewer != null) { e.ActivatedImageViewer.EventBroker.TileSelected += OnTileSelected; e.ActivatedImageViewer.EventBroker.MouseCaptureChanged += OnMouseCaptureChanged; e.ActivatedImageViewer.EventBroker.GraphicSelectionChanged += OnGraphicSelectionChanged; } NotifyPropertyChanged("AnnotationModuleEnabled"); NotifyPropertyChanged("CreateAnnotationEnabled"); NotifyPropertyChanged("CalculationInfo"); }
protected override void OnActiveImageViewerChanged(ActiveImageViewerChangedEventArgs e) { if (e.DeactivatedImageViewer != null) { e.DeactivatedImageViewer.EventBroker.DisplaySetSelected -= OnDisplaySetSelected; } if (e.ActivatedImageViewer != null) { e.ActivatedImageViewer.EventBroker.DisplaySetSelected += OnDisplaySetSelected; } NotifyAllPropertiesChanged(); }
protected override void OnActiveImageViewerChanged(ActiveImageViewerChangedEventArgs e) { if (e.DeactivatedImageViewer != null) { e.DeactivatedImageViewer.EventBroker.GraphicSelectionChanged -= new EventHandler <GraphicSelectionChangedEventArgs>(OnGraphicSelectionChanged); } if (e.ActivatedImageViewer != null) { e.ActivatedImageViewer.EventBroker.GraphicSelectionChanged += new EventHandler <GraphicSelectionChangedEventArgs>(OnGraphicSelectionChanged); } OnAllPropertiesChanged(); }
protected override void OnActiveImageViewerChanged(ActiveImageViewerChangedEventArgs e) { // Add update event handlers if (e.ActivatedImageViewer != null) { //e.ActivatedImageViewer.EventBroker.PresentationImageSelected += OnPresentationImageSelected; e.ActivatedImageViewer.EventBroker.TileSelected += OnTileSelected; e.ActivatedImageViewer.EventBroker.MouseCaptureChanged += OnMouseCaptureChanged; } NotifyPropertyChanged("AnnotationModuleEnabled"); NotifyPropertyChanged("CreateAnnotationEnabled"); NotifyPropertyChanged("CalculationInfo"); }
protected override void OnActiveImageViewerChanged(ActiveImageViewerChangedEventArgs e) { // stop listening to the old image viewer, if one was set if (e.DeactivatedImageViewer != null) { e.DeactivatedImageViewer.EventBroker.PresentationImageSelected -= EventBroker_PresentationImageSelected; } // start listening to the new image viewer, if one has been set if (e.ActivatedImageViewer != null) { e.ActivatedImageViewer.EventBroker.PresentationImageSelected += EventBroker_PresentationImageSelected; } Update(); }
protected override void OnActiveImageViewerChanged(ActiveImageViewerChangedEventArgs e) { if (e.DeactivatedImageViewer != null) { e.DeactivatedImageViewer.EventBroker.TileSelected -= OnTileSelected; e.DeactivatedImageViewer.CommandHistory.CurrentCommandChanging -= OnCommandChanging; } if (e.ActivatedImageViewer != null) { e.ActivatedImageViewer.EventBroker.TileSelected += OnTileSelected; e.ActivatedImageViewer.CommandHistory.CurrentCommandChanging += OnCommandChanging; } Enabled = CanStart(); }
protected override void OnActiveImageViewerChanged(ActiveImageViewerChangedEventArgs e) { // stop listening to the old image viewer, if one was set if (e.DeactivatedImageViewer != null) { e.DeactivatedImageViewer.PhysicalWorkspace.LockedChanged -= OnPhysicalWorkspaceLockedChanged; e.DeactivatedImageViewer.EventBroker.DisplaySetSelected -= OnDisplaySetSelected; } // start listening to the new image viewer, if one has been set if (e.ActivatedImageViewer != null) { e.ActivatedImageViewer.PhysicalWorkspace.LockedChanged += OnPhysicalWorkspaceLockedChanged; e.ActivatedImageViewer.EventBroker.DisplaySetSelected += OnDisplaySetSelected; } Update(); }
protected override void OnActiveImageViewerChanging(ActiveImageViewerChangedEventArgs e) { StopCine(); }
protected override void OnActiveImageViewerChanged(ActiveImageViewerChangedEventArgs e) { if (e.DeactivatedImageViewer != null) e.DeactivatedImageViewer.EventBroker.GraphicSelectionChanged -= new EventHandler<GraphicSelectionChangedEventArgs>(OnGraphicSelectionChanged); if (e.ActivatedImageViewer != null) e.ActivatedImageViewer.EventBroker.GraphicSelectionChanged += new EventHandler<GraphicSelectionChangedEventArgs>(OnGraphicSelectionChanged); OnAllPropertiesChanged(); }
protected override void OnActiveImageViewerChanged(ActiveImageViewerChangedEventArgs e) { OnSubjectChanged(); }
/// <summary> /// Called when the active image viewer has changed. /// </summary> protected virtual void OnActiveImageViewerChanged(ActiveImageViewerChangedEventArgs e) { }