コード例 #1
0
 private void sendTimer_Tick(object sender, EventArgs e)
 {
     sendTimer.Stop();
     if (XBoxIO.XBox.Connected)
     {
         if (XBoxIO.XBox.Gamepad == null)
         {
             running = false;
             MessageBox.Show("Unable To Access Gamepad", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else
         {
             InputState inputStateCopy = new InputState();
             inputStateCopy.AssignState(inputState);
             XBoxIO.XBox.Gamepad.SetState(0, inputStateCopy);
             inputState = new InputState();
             sendTimer.Start();
         }
     }
 }