Beispiel #1
0
 /// <summary>Registers the HWndCtrl to this ROIController instance</summary>
 public void setViewController(HWndCtrl view)
 {
     viewController = view;
 }
        /// <summary> 
        /// Performs the initialization of the HDisplayControl
        /// during loading to the memory.
        /// </summary>
        private void HDisplayControl_Load(object sender, EventArgs e)
        {
            hWndControl = new HWndCtrl(viewPort);

              // Initialization graphic window size
              windowExtents = new Rectangle(0, 0, this.viewPort.WindowSize.Width,
                                                this.viewPort.WindowSize.Height);

              imageWidth = imageHeight = 0;

              displayZoomValue = 100;
              zoomCenter = new Point(windowExtents.Width / 2, windowExtents.Height / 2);

              if (MoveOnPressedMouseButton)
            hWndControl.setViewState(HWndCtrl.MODE_VIEW_MOVE);
              else
            hWndControl.setViewState(HWndCtrl.MODE_VIEW_NONE);

              // add event handler after zooming the image
              hWndControl.OnImageZoomed += new OnIconicObjectZoomedHandler(
                                  this.hWndControl_IconicObjectZoomed);
              hWndControl.OnImageMoved  += new OnIconicObjectMovedHandler(
                                  this.hWndControl_IconicObjectMoved);
              // setup ROIController
              roiController = new ROIController();
              hWndControl.useROIController(roiController);

              // handle the changes of regions
              roiController.NotifyRCObserver = null;
              roiController.NotifyRCObserver = new IconicDelegate(UpdateViewData);
              hWndControl.clearList();
              //---------

              // set the sign of the draw region to the value "Add Region"
              roiController.setROISign(ROIController.MODE_ROI_POS);
              this.ShowROI = true;
        }
 /// <summary>Registers the HWndCtrl to this ROIController instance</summary>
 public void setViewController(HWndCtrl view)
 {
     viewController = view;
 }