Exemplo n.º 1
0
        /// <summary>
        /// Deletes the only instance of HaptiQsManager
        /// </summary>
        public void delete()
        {
            Helper.Logger("HaptiQ_API.HaptiQsManager.delete:: Deleting HaptiQsManager instance");
            foreach (KeyValuePair<UInt32, HaptiQ> HaptiQ in _HaptiQsDictionary)
            {
                HaptiQ.Value.close();
            }

            disposePhidgetManager();
            disposeInput();
            _mInstance = null;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates an object of type HaptiQsManager.
 /// HaptiQsManager is a singleton object, so there can only be one instance for the entire program.
 /// If Create is called twice, then an Exception is thrown.
 /// 
 /// The creation of HaptiQsManager includes the detection of Phidgets boards
 /// and the configuration of HaptiQs.
 /// </summary>
 /// <param name="windowName"></param>
 /// <param name="inputClass"></param>
 /// <returns></returns>
 public static HaptiQsManager Create(String windowName, String inputClass)
 {
     if (inputClass == null)
     {
         Helper.Logger("HaptiQ_API.HaptiQsManager.Create:: inputClass is null");
         throw new ArgumentNullException("HaptiQ_API.HaptiQsManager.Create:: inputClass");
     }
     if (_mInstance != null)
     {
         Helper.Logger("HaptiQ_API.HaptiQsManager.Create:: Object already created");
         throw new Exception("HaptiQ_API.HaptiQsManager.Create:: Object already created");
     }
     _mInstance = new HaptiQsManager(windowName, inputClass);
     return _mInstance;
 }