/// <summary> /// Gets a single instance of CurvesMgr /// </summary> /// <returns>an instance of CurvesMgr</returns> public static CurvesMgr GetInstance() { if (_curveMgr == null) { _curveMgr = new CurvesMgr(); } return(_curveMgr); }
/// <summary> /// Starts adquisition from field through serial port /// </summary> public void StartAdquisition() { if (_serialPort == null) { InitSerialPort(); } // Open _serialPort.Open(); // Generate new current curve CurvesMgr.GetInstance().CurveAcquired = new Curve() { Id = Functions.TimeStampMS() }; // Activate DataReceived Event _serialPort.DataReceived += _serialPort_DataReceived; }