Пример #1
0
 public void Dispose()
 {
     try
     {
         if (CueSDK.IsInitialized)
         {
             CueSDK.Reinitialize(false);
             CueSDK.Reset();
         }
     }
     catch (Exception)
     {
     }
 }
Пример #2
0
 public override void Disable()
 {
     try
     {
         CueSDK.Reset();
     }
     catch (WrapperException e)
     {
         // This occurs when releasing the SDK after sleep, ignore it
         if (e.Message != "The previously loaded Keyboard got disconnected.")
         {
             throw;
         }
     }
 }
Пример #3
0
        public static void OnUnload(bool isTerminating)
        {
            var ioC = IoC.Instance;

            ioC.GetInstance <IRage>().LogTrivialDebug("received unload command with termination " + isTerminating);

            //this prevents RAGE from throwing an exception if the plugin couldn't load correctly (aka no SDK)
            if (!ioC.InstanceExists <IVehicleListener>())
            {
                return;
            }

            ioC.GetInstance <IVehicleListener>().Stop();
            ioC.GetInstance <IEffectsManager>().OnUnload(isTerminating);

            if (CueSDK.IsSDKAvailable())
            {
                CueSDK.Reset();
            }
        }