| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
-
- using OTSDataType;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using OTSCLRINTERFACE;
- namespace OTSModelSharp.ServiceInterface
- {
-
-
- using OTSCLRINTERFACE;
- using System.Drawing;
- public class EDSController : IEDSController
- {
- private COTSControlFunExport eds;
- static EDSController edsctrl=null;
- public static EDSController GetEDSController()
- {
- if (edsctrl == null)
- {
- edsctrl = new EDSController();
- }
- return edsctrl;
-
- }
- private EDSController()
- {
- eds = SemController.hw;
- }
- public bool GetXRayByFeatures(List<COTSParticleClr> a_listParticles, double a_nXRayAQTime, bool a_bElementInfo)
- {
- if (!eds.IsConnected())
- {
- return false;
- }
-
- COTSParticleClr[] parts = a_listParticles.ToArray();
-
-
- return eds.GetXRayByFeatures((uint)a_nXRayAQTime, parts, a_bElementInfo);
-
- }
- public bool GetXRayByPoints(List<COTSParticleClr> a_listParticles, uint a_nXRayAQTime, bool a_bElementInfo)
- {
- if (!eds.IsConnected())
- {
- return false;
- }
-
- int xrayNum = a_listParticles.Count;
- Point[] Ps = new Point[xrayNum];
- for (int i = 0; i < xrayNum; i++)
- {
- Point p = (Point)a_listParticles[i].GetXRayPos();
- Ps[i].X = p.X;
- Ps[i].Y = p.Y;
- }
-
- COTSParticleClr[] parts = a_listParticles.ToArray();
- string[] a_strEleResult = new string[xrayNum];
- return eds.GetXRayByPoints(a_nXRayAQTime, Ps,parts, a_bElementInfo);
-
- }
- public bool Init()
- {
-
- bool m_init= eds.EDSInit();
- return m_init;
- }
- }
- }
|