示例#1
0
        private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (hWindow == null)
            {
                return;
            }
            switch (this.tabControl1.SelectedIndex)
            {
            case 1:
                this.tabCurrent.Controls.Clear();
                this.tabCurrent.Controls.Add(hWindow);
                HImage hImage = Machine.Instance.Camera.Executor.CurrentBytes.ToHImage(
                    Machine.Instance.Camera.Executor.ImageWidth,
                    Machine.Instance.Camera.Executor.ImageHeight);
                this.currentImage = hImage;
                this.tempImage    = this.currentImage;
                break;

            case 2:
                this.tabReference.Controls.Clear();
                this.tabReference.Controls.Add(hWindow);
                this.tempImage = this.referenceImage;
                break;
            }
            this.slectedTabIndex = this.tabControl1.SelectedIndex;
            mView.resetWindow();
            mView.HRegionList.Clear();
            mView.setImage(this.tempImage);
            mView.repaint();
        }
示例#2
0
 private void TBFitToScreen_Click(object sender, EventArgs e)
 {
     try
     {
         lock (m_lockShowpicture)
         {
             hWndCtrl.resetWindow();
             hWndCtrl.repaint();
         }
     }
     catch
     {
     }
 }
        /*******************************************************************/
        private void ResetButton_Click(object sender, System.EventArgs e)
        {
            locked = true;
            zoomImgComboBox.SelectedIndex = 3;
            viewControl.resetWindow();
            locked = false;

            if (zoomWndComboBox.SelectedIndex != 3)
            {
                zoomWndComboBox.SelectedIndex = 3;
            }
            else
            {
                viewControl.repaint();
            }
        }
 private void NoneImageModeButton_Click(object sender, EventArgs e)
 {
     //影像 fit to window
     if (mView != null)
     {
         mView.resetWindow();
         updateView();
         //drawNonROIElement();
     }
 }
示例#5
0
        /**************************************************************************/

        /* Reset the view to its initial setting
         * *************************************************************************/
        private void resetButton_Click(object sender, System.EventArgs e)
        {
            XTrackBar.Value  = 50;
            YTrackBar.Value  = 50;
            ZoomUpDown.Value = 100;

            hWndControl.resetGUIInitValues(XTrackBar.Value,
                                           (YTrackBar.Maximum - YTrackBar.Value));
            hWndControl.resetWindow();
            hWndControl.repaint();
        }
        /// <summary>
        /// Reset window settings for zoom and pan
        /// </summary>
        public void ResetDisplaySettings()
        {
            // clear all settings in graphic window
            //hWndControl.resetAll();
            hWndControl.resetWindow();

            // set the flag to display the full image
            // in correct aspect ration in graphic window
            if (imageViewState == ImageViewStates.fitToWindow)
            {
                hWndControl.adaptSize = true;
            }
            else
            {
                hWndControl.adaptSize = false;
            }
            if ((imageWidth > 0) && (imageHeight > 0))
            {
                hWndControl.resetImagePart(imageWidth, imageHeight);
            }

            this.Invalidate();
        }
示例#7
0
 /*************************************************************************
  * Eventhandles to reset the window to the initial view dimensions, as well
  * as clearing the graphics stack from all iconic objects added - display
  * will be black then.
  * /**************************************************************************/
 private void ResetButton_Click(object sender, System.EventArgs e)
 {
     viewControl.resetWindow();
     viewControl.repaint();
 }
 /* reset the view to the initial display dimensions */
 private void resetButton_Click(object sender, System.EventArgs e)
 {
     hWndControl.resetWindow();
     hWndControl.repaint();
 }