EDSController.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. 
  2. using OTSDataType;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using OTSCLRINTERFACE;
  9. namespace OTSModelSharp.ServiceInterface
  10. {
  11. using OTSCLRINTERFACE;
  12. using System.Drawing;
  13. public class EDSController : IEDSController
  14. {
  15. private COTSControlFunExport eds;
  16. public EDSController()
  17. {
  18. }
  19. public void GetXRayByFeatures(List<COTSParticleClr> a_listParticles, double a_nXRayAQTime, bool a_bElementInfo)
  20. {
  21. Init();
  22. COTSParticleClr[] parts = a_listParticles.ToArray();
  23. eds.GetXRayByFeatures((uint)a_nXRayAQTime, parts, a_bElementInfo);
  24. }
  25. public void GetXRayByPoints(List<COTSParticleClr> a_listParticles, uint a_nXRayAQTime, bool a_bElementInfo)
  26. {
  27. Init();
  28. int xrayNum = a_listParticles.Count;
  29. Point[] Ps = new Point[xrayNum];
  30. for (int i = 0; i < xrayNum; i++)
  31. {
  32. Point p = (Point)a_listParticles[i].GetXRayPos();
  33. Ps[i].X = p.X;
  34. Ps[i].Y = p.Y;
  35. }
  36. COTSParticleClr[] parts = a_listParticles.ToArray();
  37. string[] a_strEleResult = new string[xrayNum];
  38. eds.GetXRayByPoints(a_nXRayAQTime, Ps,parts, a_bElementInfo);
  39. return ;
  40. }
  41. public bool Init()
  42. {
  43. eds = SemController.hw;
  44. return eds.EDSInit();
  45. }
  46. }
  47. }