コード例 #1
0
        void InitializeAdjustFusionImageForm()
        {
            _currentAnnDesigner = null;

            int cellIndex = _form.GetFirstSelectedMultiCellIndex();

            if (cellIndex == -1)
            {
                return;
            }

            _cell = (MedicalViewerMultiCell)_viewer.Cells[cellIndex];
            if (_cell == null)
            {
                return;
            }

            _cell.Automation.Edit          += new EventHandler <AnnEditDesignerEventArgs>(Automation_Edit);
            _cell.Automation.SetCursor     += new EventHandler <AnnCursorEventArgs>(Automation_SetCursor);
            _cell.Automation.RestoreCursor += Automation_RestoreCursor;

            _cellFusionNames = _form.FusionListNames[cellIndex];
            UpdateFusionUI(0);
            UpdateFusionComboBox();
            MedicalViewerSubCell subCell = _cell.SubCells[_cell.ActiveSubCell];

            this.FormClosing += new FormClosingEventHandler(AdjustFusionImage_FormClosing);

            _cell.Paint                += new PaintEventHandler(_cell_Paint);
            _cell.DesignerCreated      += new EventHandler <MedicalViewerDesignerCreatedEventArgs>(_cell_DesignerCreated);
            _cell.ActiveSubCellChanged += new EventHandler <MedicalViewerActiveSubCellChangedEventArgs>(_cell_ActiveSubCellChanged);
            _cell.DeleteAnnotation     += new EventHandler <MedicalViewerDeleteEventArgs>(_cell_DeleteAnnotation);
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: sakpung/webstudy
        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);
            }
        }
コード例 #3
0
 private void _cell_DesignerCreated(object sender, MedicalViewerDesignerCreatedEventArgs e)
 {
     _currentAnnDesigner    = (AnnEditDesigner)e.Designer;
     e.Object.RotateGripper = new LeadLengthD(e.Object.RotateGripper.Value / 2);
 }