Example #1
0
        /// <summary>
        /// Checkes if a given instance of {@link TETCSharpClient.ICalibrationStateListener} is currently attached.
        /// </summary>
        /// <returns>True if already attached, false otherwise</returns>
        public bool HasCalibrationStateListener(ICalibrationResultListener listener)
        {
            bool result = false;

            lock (((ICollection)calibrationStateListeners).SyncRoot)
            {
                result = calibrationStateListeners.Contains(listener);
            }

            return(result);
        }
Example #2
0
 /// <summary>
 /// Adds a {@link TETCSharpClient.ICalibrationStateListener} to the TET C# client. This listener
 /// will recieve updates about calibration state changes.
 /// </summary>
 /// <param name="listener"/>The {@link TETCSharpClient.ICalibrationStateListener} instance to add</param>
 public void AddCalibrationStateListener(ICalibrationResultListener listener)
 {
     if (null != listener)
     {
         lock (((ICollection)calibrationStateListeners).SyncRoot)
         {
             if (!calibrationStateListeners.Contains(listener))
             {
                 calibrationStateListeners.Add(listener);
             }
         }
     }
 }
        /// <summary>
        /// Checkes if a given instance of {@link TETCSharpClient.ICalibrationStateListener} is currently attached.
        /// </summary>
        /// <returns>True if already attached, false otherwise</returns>
        public bool HasCalibrationStateListener(ICalibrationResultListener listener)
        {
            bool result = false;

            lock (((ICollection)calibrationStateListeners).SyncRoot)
            {
                result = calibrationStateListeners.Contains(listener);
            }

            return result;
        }
 /// <summary>
 /// Adds a {@link TETCSharpClient.ICalibrationStateListener} to the TET C# client. This listener 
 /// will recieve updates about calibration state changes.
 /// </summary>
 /// <param name="listener"/>The {@link TETCSharpClient.ICalibrationStateListener} instance to add</param>
 public void AddCalibrationStateListener(ICalibrationResultListener listener)
 {
     if (null != listener)
     {
         lock (((ICollection)calibrationStateListeners).SyncRoot)
         {
             if (!calibrationStateListeners.Contains(listener))
                 calibrationStateListeners.Add(listener);
         }
     }
 }
Example #5
0
        /// <summary>
        /// Remove a <see cref="TETCSharpClient.ICalibrationResultListener"/> from the TET C# client.
        /// </summary>
        /// <returns>True if succesfully removed, false otherwise</returns>
        /// <param name="listener">The <see cref="TETCSharpClient.ICalibrationResultListener"/> instance to remove</param>
        public bool RemoveCalibrationResultListener(ICalibrationResultListener listener)
        {
            bool result = false;

            if (null != listener)
            {
                if (calibrationResultListeners.Contains(listener))
                    result = calibrationResultListeners.Remove(listener);
            }

            return result;
        }
Example #6
0
        /// <summary>
        /// Checkes if a given instance of <see cref="TETCSharpClient.ICalibrationResultListener"/> is currently attached.
        /// </summary>
        /// <returns>True if already attached, false otherwise</returns>
        public bool HasCalibrationResultListener(ICalibrationResultListener listener)
        {
            bool result = false;

            if (null != listener)
            {
                result = calibrationResultListeners.Contains(listener);
            }

            return result;
        }
Example #7
0
 /// <summary>
 /// Adds a <see cref="ICalibrationResultListener"/> to the TET C# client. This listener 
 /// will recieve updates about calibration state changes.
 /// </summary>
 /// <param name="listener">The <see cref="TETCSharpClient.ICalibrationResultListener"/> instance to add</param>
 public void AddCalibrationResultListener(ICalibrationResultListener listener)
 {
     if (null != listener)
     {
         if (!calibrationResultListeners.Contains(listener))
             calibrationResultListeners.Add(listener);
     }
 }