Browse Source

do not read the mag parameter when do imageboundary method

GSP 2 months ago
parent
commit
ef647d488f

+ 1 - 74
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/OTSSamplespaceWindow.cs

@@ -477,42 +477,6 @@ namespace OTSMeasureApp
             }
         }
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-        
-        
-        
-        
-        
-        
         
         public void DrawCircleByFixedpoint()
         {
@@ -562,44 +526,7 @@ namespace OTSMeasureApp
                 PrepareVisualMeasureField(GetWorkingVisualSample());
             }
         }
-        public void DrawRectangleByLengthAndWidth()
-        {
-            frmInitializeLengthAndWidthRectangle frmInput = new frmInitializeLengthAndWidthRectangle();
-            DialogResult result = frmInput.ShowDialog();
-            if (result == DialogResult.OK)
-            {
-                double length = frmInput.length;
-                double wide = frmInput.width;
-                var sam = GetWorkingVisualSample();
-                CMeasureArea area= sam.GetMeasureGDIObject();
-                PointF center = new PointF(area.GetZoomedRegionF().Left + area.GetZoomedRegionF().Width / 2, area.GetZoomedRegionF().Top + area.GetZoomedRegionF().Height / 2);
-                PointF otslt = new PointF(), otsrb = new PointF();
-                PointF lt = new PointF((float)(center.X - m_visualStage.MicronConvertToPixel(length) / 2), (float)(center.Y - m_visualStage.MicronConvertToPixel(wide) / 2));
-                PointF rb = new PointF((float)(center.X + m_visualStage.MicronConvertToPixel(length) / 2), (float)(center.Y + m_visualStage.MicronConvertToPixel(wide) / 2));
-
-                m_visualStage.m_SEMStageData.ConvertSEMToOTSCoord(lt, ref otslt);
-                m_visualStage.m_SEMStageData.ConvertSEMToOTSCoord(rb, ref otsrb);
-
-                var visualRec = m_visualStage.GetCtrlCoordRectF(otslt, otsrb);
-                Color MeasureColor = Color.Red;
-                CMeasureArea newGDI = new CMeasureArea(visualRec, ShapeType.RECTANGLE, "", sam.GetSampleName(), MeasureColor);
-
-                newGDI.SetZoomNumber(m_visualStage.GetZoomNum());
-                newGDI.SetDisplayRefPoint(m_visualStage.GetDisplayRefPoint());
-                newGDI.IsWorkSample = true;
-                sam.SetMeasureGDIObject(newGDI);
-                m_DrawPolygonFinishGDIObject = null;
-                m_DrawMeasureGDIObject = null;
-                var para = m_visualStage.GetSampleMeasurePara(sam.GetMeasureGDIObject());
-
-
-
-
-
-                SetWorkSampleMeasureArea(para);
-                PrepareVisualMeasureField(GetWorkingVisualSample());
-            }
-        }
+       
         public void SetWorkSampleMeasureArea(SampleMeasurePara SMeasurePara)
         {
             COTSSample WSample = m_MeasureAppForm.m_ProjParam.GetResultData().GetWorkingSample();

+ 1 - 0
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/frmInitializeImageboundary.Designer.cs

@@ -388,6 +388,7 @@
             this.tBx_Magnification.Name = "tBx_Magnification";
             this.tBx_Magnification.Size = new System.Drawing.Size(100, 21);
             this.tBx_Magnification.TabIndex = 29;
+            this.tBx_Magnification.Text = "100";
             this.tBx_Magnification.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
             // 
             // label10

+ 1 - 1
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/frmInitializeImageboundary.cs

@@ -67,7 +67,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
         {
             if (cfun == null) { cfun = SemController.GetSEMController(); }
             cB_Inclinedplanefocus.Checked = true; double val = 0;
-            if (cfun.GetMagnification(ref val)) tBx_Magnification.Text = val.ToString();
+            //if (cfun.GetMagnification(ref val)) tBx_Magnification.Text = val.ToString();
             if (panel1 != null)
             {
                 panel1.Paint += panel1_Paint;