IpcSEMController.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using OTSCLRINTERFACE;
  2. using OTSCommon.Model;
  3. using OTSDataType;
  4. using OTSMeasureApp._0_OTSModel.Measure._4_ReMeasure;
  5. using OTSModelSharp;
  6. using OTSModelSharp.ServiceCenter;
  7. using OTSModelSharp.ServiceInterface;
  8. using System;
  9. using System.Collections;
  10. using System.Collections.Generic;
  11. using System.Drawing;
  12. using System.Linq;
  13. using System.Text;
  14. using System.Threading.Tasks;
  15. namespace OTSMeasureApp.ServiceCenter
  16. {
  17. public class IpcSEMController: MarshalByRefObject
  18. {
  19. private SemController sem= SemController.GetSEMController();
  20. public bool MoveSEMToPoint(Point poi)
  21. {
  22. if (!sem.IsConnected())
  23. {
  24. return false;
  25. }
  26. return sem.MoveSEMToPoint(poi.X, poi.Y);
  27. }
  28. public bool GetSemPositionXY(ref double a_dPositionX, ref double a_dPositionY, ref double a_dPositionR)
  29. {
  30. if (!sem.IsConnected())
  31. {
  32. return false;
  33. }
  34. return sem.GetSemPositionXY(ref a_dPositionX, ref a_dPositionY, ref a_dPositionR);
  35. }
  36. public bool ReMeasure(string samplePath, int width, int height, Dictionary<int, List<Particle>> keyValues, int IMGSCANSPEED_INDEX, int XRAYSCANMODE_INDEX, int NUD_SCANTIME_COUNT)
  37. {
  38. SmplMeasureReMeasure smplMeasure = new SmplMeasureReMeasure();
  39. bool isSuccess = smplMeasure.ReMeasure(samplePath, width, height, keyValues, IMGSCANSPEED_INDEX, XRAYSCANMODE_INDEX, NUD_SCANTIME_COUNT);
  40. return isSuccess;
  41. }
  42. }
  43. }