|
@@ -1151,8 +1151,92 @@ namespace OTSSysMgrApp
|
|
|
|
|
|
private void bn_continuousshot_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
- a_dScanFieldSizeX = 100.0 * m_oScanField100.cx / a_dMagnification;
|
|
|
- a_dScanFieldSizeY = 100.0 * m_oScanField100.cy / a_dMagnification;
|
|
|
+ ISemController m_Sem= SemController.GetSEMController();
|
|
|
+
|
|
|
+ //电镜设置对象
|
|
|
+ var cfun = ScanController.GetScanController();
|
|
|
+
|
|
|
+ bool IsConnec = cfun.Init();
|
|
|
+
|
|
|
+ double Magnification = 0;
|
|
|
+ m_Sem.GetMagnification(ref Magnification);
|
|
|
+ double a_dScanFieldSizeX = 0;
|
|
|
+ double a_dScanFieldSizeY = 0;
|
|
|
+ m_Sem.GetScanFieldSize(ref a_dScanFieldSizeX,ref a_dScanFieldSizeY);
|
|
|
+
|
|
|
+ double PositionX = 0;
|
|
|
+ double PositionY = 0;
|
|
|
+ double PositionR = 0;
|
|
|
+ m_Sem.GetSemPositionXY(ref PositionX, ref PositionY, ref PositionR);
|
|
|
+ for(int i=0;i<4;i++)
|
|
|
+ {
|
|
|
+ PositionX += a_dScanFieldSizeX;
|
|
|
+ PositionY += a_dScanFieldSizeY;
|
|
|
+ m_Sem.MoveSEMToPoint(PositionX, PositionY);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ try
|
|
|
+ {
|
|
|
+ string str1 = table["str1"].ToString();
|
|
|
+ btnDisplay.Text = str1;
|
|
|
+ btnDisplay.Enabled = false;
|
|
|
+ btnDisplay.Refresh();
|
|
|
+ if (pbImage.Image != null)
|
|
|
+ {
|
|
|
+ pbImage.Image = null;
|
|
|
+ pbImage.Refresh();
|
|
|
+ }
|
|
|
+ Thread.Sleep(100);
|
|
|
+
|
|
|
+ //设置图像分辨率
|
|
|
+ int width = 0;
|
|
|
+ int height = 0;
|
|
|
+ //获取宽度
|
|
|
+ width = Convert.ToInt32(tbRWidth.Text);
|
|
|
+ height = Convert.ToInt32(tbRHeight.Text);
|
|
|
+
|
|
|
+ byte[] ImageByte = new byte[width * height];
|
|
|
+ Bitmap bitmap = null;
|
|
|
+ int iWidth = Convert.ToInt32(tbRWidth.Text);
|
|
|
+ int iHeight = Convert.ToInt32(tbRHeight.Text);
|
|
|
+ bool resultValue = GetScanImage(iWidth, iHeight, ddlDwellTime.Text, ref ImageByte);
|
|
|
+ string str2 = table["str2"].ToString();
|
|
|
+
|
|
|
+ if (resultValue)
|
|
|
+ {
|
|
|
+ if (ImageByte != null)
|
|
|
+ {
|
|
|
+ bitmap = CImageHandler.ToGrayBitmap(ImageByte, width, height);
|
|
|
+ pbImage.Image = bitmap;
|
|
|
+ btnSaveImage.Enabled = true;
|
|
|
+ log.Info("Image capture success!\nImage resolution:" + tbRWidth.Text + "X" + tbRHeight.Text + ";");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ MessageBox.Show(str2, "Tip");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ MessageBox.Show(str2, "Tip");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ log.Error("ControllerSettingForm_btnDisplay_Click--错误信息:" + ex.ToString());
|
|
|
+ }
|
|
|
+ finally
|
|
|
+ {
|
|
|
+ string str = table["btndisplay"].ToString();
|
|
|
+ btnDisplay.Text = str;
|
|
|
+ btnDisplay.Enabled = true;
|
|
|
+ btnDisplay.Refresh();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|