コード例 #1
0
 private void RemoveFusionEditRectangle(MedicalViewerSubCell subCell, int removeIndex)
 {
     if (subCell.AnnotationContainer.Children.Count != 0)
     {
         subCell.AnnotationContainer.Children.RemoveAt(removeIndex);
         _cell.RefreshAnnotation();
     }
 }
コード例 #2
0
        private void ShowFusionEditRectangle(int index)
        {
            int subCellIndex = _cell.ActiveSubCell;

            MedicalViewerSubCell subCell = _cell.SubCells[subCellIndex];

            for (int i = 0; i < subCell.AnnotationContainer.Children.Count; i++)
            {
                subCell.AnnotationContainer.Children[i].IsVisible = false;
            }

            AddAnnotationRectangle(subCell);

            UpdateFusionEditRectangle(index);

            subCell.AnnotationContainer.Children[index].IsVisible = true;
            _cell.RefreshAnnotation();
        }
コード例 #3
0
        private void _btnApply_Click(object sender, EventArgs e)
        {
            if (_chkUsePen.Checked)
            {
                GetColor(_lblPenColor.BackColor);
                _annObj.Stroke = AnnStroke.Create(AnnSolidColorBrush.Create(GetColor(_lblPenColor.BackColor)), LeadLengthD.Create((double)_penWidth.Value));//, AnnUnit.Pixel));
                if (_annObj is AnnPolyRulerObject)
                {
                    AnnPolyRulerObject polyRulerObject = (AnnPolyRulerObject)_annObj;

                    polyRulerObject.TickMarksStroke = _annObj.Stroke;
                }
            }
            else
            {
                _annObj.Stroke = null;
            }

            if (_chkUseBrush.Checked)
            {
                if (_annObj is AnnHiliteObject)
                {
                    ((AnnHiliteObject)_annObj).HiliteColor = GetColor(_lblBrushColor.BackColor);
                }
                else
                {
                    _annObj.Fill = AnnSolidColorBrush.Create(GetColor(_lblBrushColor.BackColor));
                }
            }
            else
            {
                _annObj.Fill = null;
            }

            if (_annFont != null)
            {
                if (!_annFont.Equals(_annObj.Font))
                {
                    _annObj.Font = _annFont;
                }

                AnnTextObject textObject = (AnnTextObject)_annObj;

                textObject.TextForeground = AnnSolidColorBrush.Create(GetColor(_fontColor));
            }

            _cell.RefreshAnnotation();
        }