1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- using OTSCommon.DBOperate.Model;
- using OTSDataType;
- using OTSMeasureApp._0_OTSModel.Measure._4_ReMeasure;
- using OTSModelSharp.ServiceCenter;
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.Windows.Forms;
- namespace OTSMeasureApp.ServiceCenter
- {
- public class IpcSEMController: MarshalByRefObject
- {
- private ISemController sem = SemController.GetSEMController();
- private IScanController scan = ScanController.GetScanController();
- SmplMeasureReMeasure measureReMeasure;
- public bool TestConn()
- {
- if (!sem.IsConnected())
- {
- return false;
- }
- return true;
- }
- public bool MoveSEMToPoint(Point poi)
- {
- if (!sem.IsConnected())
- {
- return false;
- }
- return sem.MoveSEMToPoint(poi.X, poi.Y);
- }
- public bool GetSemPositionXY(ref double a_dPositionX, ref double a_dPositionY, ref double a_dPositionR)
- {
- if (!sem.IsConnected())
- {
- return false;
- }
- return sem.GetSemPositionXY(ref a_dPositionX, ref a_dPositionY, ref a_dPositionR);
- }
- public bool SetMagnification(double a_dMagnification)
- {
- if (!sem.IsConnected())
- {
- return false;
- }
- return sem.SetMagnification(a_dMagnification);
- }
- public bool AcquireBSEImage(string sampleName, int width, int height, DwellTimeLevel dwellTime, ref byte[] ImageByte)
- {
- scan.Init();
- scan.SetDwellTime(dwellTime);
- scan.SetImageSize(width, height);
- var aMeasureAppForm = (OTSIncAMeasureAppForm)Application.OpenForms["OTSIncAMeasureAppForm"];
- COTSSample sampleClr = aMeasureAppForm.m_ProjRstData.GetSampleByName(sampleName);
- var samplePath=aMeasureAppForm.m_ProjRstData.GetSampleWorkingFolder(sampleName);
- measureReMeasure = new SmplMeasureReMeasure(samplePath, sampleClr);
- ImageByte = measureReMeasure.SetReFldInfo(sampleName, scan.AcquireBSEImage());
- return true;
- }
- public bool AcquisitionSpectrum(string samplePath, int xrayMode, double new_PixelSize, ref Particle particle, uint a_nXRayAQTime)
- {
- return measureReMeasure.AcquisitionSpectrum(samplePath, xrayMode, new_PixelSize, ref particle, a_nXRayAQTime);
- }
-
- }
- }
|