Ejemplo n.º 1
0
        void TerminateAdjustFusionImageForm()
        {
            HideAllFusionEditRectangles();
            if (_currentAnnDesigner != null)
            {
                _currentAnnDesigner.End();
            }

            this.FormClosing -= new FormClosingEventHandler(AdjustFusionImage_FormClosing);

            if (_cell != null && !_cell.IsDisposed)
            {
                MedicalViewerSubCell subCell = _cell.SubCells[_cell.ActiveSubCell];

                _cell.Paint                -= new PaintEventHandler(_cell_Paint);
                _cell.DesignerCreated      -= new EventHandler <MedicalViewerDesignerCreatedEventArgs>(_cell_DesignerCreated);
                _cell.DeleteAnnotation     -= new EventHandler <MedicalViewerDeleteEventArgs>(_cell_DeleteAnnotation);
                _cell.ActiveSubCellChanged -= new EventHandler <MedicalViewerActiveSubCellChangedEventArgs>(_cell_ActiveSubCellChanged);
            }

            if (_palettePreview.Image != null)
            {
                _palettePreview.Image.Dispose();
                _palettePreview.Image = null;
            }

            if (_orgImagePalettePreview.Image != null)
            {
                _orgImagePalettePreview.Image.Dispose();
                _orgImagePalettePreview.Image = null;
            }
        }
Ejemplo n.º 2
0
        private void _tvLayers_AfterCheck(object sender, TreeViewEventArgs e)
        {
            LayerNode node = e.Node as LayerNode;

            if (e.Action != TreeViewAction.Unknown && node != null)
            {
                if (node == _containerNode)
                {
                    _automation.Container.IsVisible = node.Checked;
                }
                else
                {
                    if (node.Layer != null)
                    {
                        node.Layer.IsVisible = node.Checked;
                    }
                }

                AnnEditDesigner editDesigner = _automation.CurrentDesigner as AnnEditDesigner;
                if (editDesigner != null)
                {
                    editDesigner.End();
                }
                _automation.Invalidate(LeadRectD.Empty);
            }
        }