Example #1
0
 //程序退出
 //! Application quit operation.
 void OnApplicationQuit()
 {
     if (LH_Mode && LH.GetReceivedStatus() != VRTRIXGloveStatus.CLOSED)
     {
         LH.ClosePort();
     }
     if (RH_Mode && RH.GetReceivedStatus() != VRTRIXGloveStatus.CLOSED)
     {
         RH.ClosePort();
     }
 }
Example #2
0
 //数据手套反初始化,硬件断开连接
 //! Disconnect data glove and uninitialization.
 public void OnDisconnectGlove()
 {
     if (LH_Mode)
     {
         if (LH.ClosePort())
         {
             LH = new VRTRIXDataWrapper(AdvancedMode, (int)Index, version);
         }
         LH_Mode = false;
     }
     if (RH_Mode)
     {
         if (RH.ClosePort())
         {
             RH = new VRTRIXDataWrapper(AdvancedMode, (int)Index, version);
         }
         RH_Mode = false;
     }
 }