using OTSCommon.Model; using OTSMeasureApp._0_OTSModel.Measure._4_ReMeasure; using OTSModelSharp.ServiceInterface; using System; using System.Collections.Generic; using System.Drawing; namespace OTSMeasureApp.ServiceCenter { public class IpcSEMController: MarshalByRefObject { private SemController sem = SemController.GetSEMController(); private ScanController scan = ScanController.GetScanController(); SmplMeasureReMeasure measureReMeasure = new SmplMeasureReMeasure(); 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, int dwellTime, ref byte[] ImageByte) { scan.Init(); scan.SetDwellTime(dwellTime); scan.SetImageSize(width, height); ImageByte = measureReMeasure.SetReFldInfo(sampleName, scan.AcquireBSEImage(0, 0, dwellTime)); 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); } } }