Example #1
0
 public void Disable(ActivateButtonClass activateButton)
 {
     if (null != activateButton.Timer)
     {
         var temp = activateButton.Timer;
         activateButton.Timer = null;
         temp.Dispose();
         activateButton.vJoy.SetBtn(false, activateButton.vJoyId, activateButton.vButton);
         activateButton.Pressed = false;
     }
 }
Example #2
0
        public void CallActivateButton(string vJoyType, uint vButton, long delay)
        {
            uint joyId = vJoyMapper.GetJoystickId(vJoyType);

            var activateButton = new ActivateButtonClass
            {
                vJoy    = vJoy,
                vJoyId  = joyId,
                vButton = vButton,
                Delay   = delay
            };

            activateButton.Timer = new Timer(new TimerCallback(Action), activateButton, 0, Timeout.Infinite);
        }