Example #1
0
        private void initUpdateCropLimitDetailsAdorner()
        {
            if (_cropAdorner != null)
            {
                _cropAdorner.Remove();
                _cropAdorner = null;
            }

            bool collapse = true;

            if (/*cropToggleButton.IsChecked.Value &&*/ CropVisibility && model3DPane != null)
            {
                if (model3DPane.Image3DProperties.ShowMIPCrop)
                {
                    showAndBindCropAdorners("PolygonControlThumbStyle", "AnchorControlThumbStyle");
                    collapse = false;
                }
            }
            else
            {
                collapse = true;
            }

            if (collapse)
            {
                cropLimitsDetails.Visibility = System.Windows.Visibility.Collapsed;
            }
            else
            {
                cropLimitsDetails.Visibility = System.Windows.Visibility.Visible;
            }
        }
Example #2
0
 private void showMIPCropUnChecked()
 {
     _cropEnable = false;
     if (_cropAdorner != null)
     {
         _cropAdorner.Remove();
         _cropAdorner = null;
         cropLimitsDetails.Visibility = System.Windows.Visibility.Collapsed;
     }
 }
Example #3
0
 void showAndBindCropAdorners(string polygonThumb, string anchorThumb)
 {
     try
     {
         if (model3DPane != null)
         {
             Style thumbStyle       = this.Resources[polygonThumb] as Style;
             Style anchorThumbStyle = this.Resources[anchorThumb] as Style;
             //_cropAdorner = new CubicRoiAdorner(new UIElement[] { xyGrid, yzGrid, xzGrid }, Colors.Gold, thumbStyle, anchorThumbStyle);
             _cropAdorner = new CubicRoiAdorner(new UIElement[] { imageViewXY.imageGrid, imageViewYZ.imageGrid, imageViewXZ.imageGrid }, Colors.Gold, thumbStyle, anchorThumbStyle);
         }
         rebindCubicCropAdorners();
     }
     catch { }
 }
Example #4
0
 void UpdateCropManipulation(bool newValue)
 {
     if (_cropVisible && _cropEnable)
     {
         _cropAdorner.Remove();
         _cropAdorner = null;
         if (newValue)
         {
             showAndBindCropAdorners("PolygonControlThumbStyle", "AnchorControlThumbStyle");
         }
         else
         {
             showAndBindCropAdorners("PolygonThumbStyle", "AnchorThumbStyle");
         }
     }
 }
Example #5
0
 void UpdateCropVisibility(bool newValue)
 {
     _cropVisible = newValue;
     if (_cropVisible && _cropEnable)
     {
         showAndBindCropAdorners("PolygonControlThumbStyle", "AnchorControlThumbStyle");
         cropLimitsDetails.Visibility = System.Windows.Visibility.Visible;
     }
     else
     {
         if (_cropAdorner != null)
         {
             _cropAdorner.Remove();
             _cropAdorner = null;
             cropLimitsDetails.Visibility = System.Windows.Visibility.Collapsed;
         }
     }
 }