xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

資源簡介

前些日子做開發(fā)的時候用到游戲手柄,這兩天整理了一下。這個代碼是用C#編寫的,希望對大家有所幫助。編譯環(huán)境是VS2010。手柄的接口類型是DirectInput形式的,通過使用系統(tǒng)底層API函數(shù)來獲取手柄狀態(tài)。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Text;
using?System.Runtime.InteropServices;

namespace?JoyKeys.DirectInputJoy
{
????public?class?API
????{
????????#region?消息定義
????????public?const?int?MM_JOY1MOVE?=?0x3A0;
????????public?const?int?MM_JOY2MOVE?=?0x3A1;
????????public?const?int?MM_JOY1BUTTONDOWN?=?0x3B5;
????????public?const?int?MM_JOY2BUTTONDOWN?=?0x3B6;
????????public?const?int?MM_JOY1BUTTONUP?=?0x3B7;
????????public?const?int?MM_JOY2BUTTONUP?=?0x3B8;
????????#endregion

????????#region?按鈕定義
????????public?const?int?JOY_BUTTON1?=?0x0001;

????????public?const?int?JOY_BUTTON2?=?0x0002;

????????public?const?int?JOY_BUTTON3?=?0x0004;

????????public?const?int?JOY_BUTTON4?=?0x0008;

????????public?const?int?JOY_BUTTON5?=?0x0010;

????????public?const?int?JOY_BUTTON6?=?0x0020;

????????public?const?int?JOY_BUTTON7?=?0x0040;

????????public?const?int?JOY_BUTTON8?=?0x0080;

????????public?const?int?JOY_BUTTON9?=?0x0100;

????????public?const?int?JOY_BUTTON10?=?0x0200;

????????public?const?int?JOY_BUTTON11?=?0x0400;

????????public?const?int?JOY_BUTTON12?=?0x0800;

????????//Button?up/down
????????public?const?int?JOY_BUTTON1CHG?=?0x0100;

????????public?const?int?JOY_BUTTON2CHG?=?0x0200;

????????public?const?int?JOY_BUTTON3CHG?=?0x0400;

????????public?const?int?JOY_BUTTON4CHG?=?0x0800;
????????#endregion

????????#region?手柄Id定義
????????///?
????????///?主游戲手柄Id
????????///?

????????public?const?int?JOYSTICKID1?=?0;
????????///?
????????///?副游戲手柄Id
????????///?

????????public?const?int?JOYSTICKID2?=?1;
????????#endregion

????????#region?錯誤號定義
????????///?
????????///?沒有錯誤
????????///?

????????public?const?int?JOYERR_NOERROR?=?0;
????????///?
????????///?參數(shù)錯誤
????????///?

????????public?const?int?JOYERR_PARMS?=?165;
????????///?
????????///?無法正常工作
????????///?

????????public?const?int?JOYERR_NOCANDO?=?166;
????????///?
????????///?操縱桿未連接?
????????///?

????????public?const?int?JOYERR_UNPLUGGED?=?167;
????????#endregion

????????///?
????????///?游戲手柄的參數(shù)信息JoystickEventArgs
????????///?

????????[StructLayout(LayoutKind.Sequential)]
????????public?struct?JOYCAPS
????????{
????????????public?ushort?wMid;
????????????public?ushort?wPid;
????????????[MarshalAs(UnmanagedType.ByValTStr?SizeConst?=?32)]
????????????public?string?szPname;
????????????public?int?wXmin;
????????????public?int?wXmax;
????????????public?int?wYmin;
????????????public?int?wYmax;
????????????public?int?wZmin;
????????????public?int?wZmax;
????????????public?int?wNumButtons;
????????????public?int?wPeriodMin;
????????????public?int?wPeriodMax;
????????????public?int?wRmin;
????????????public?int?wRmax;
????????????public?int?wUmin;
????????????public?int?wUmax;
????????????public?int?wVmin;
????????????public?int?wVmax;
?

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????16896??2014-08-27?08:30??Jokstick\JoyKeys\bin\Debug\JoyKeys.dll

?????文件??????62976??2014-08-27?08:30??Jokstick\JoyKeys\bin\Debug\JoyKeys.pdb

?????文件???????6391??2014-08-22?13:52??Jokstick\JoyKeys\DirectInputJoy\API.cs

?????文件???????8884??2014-08-22?13:50??Jokstick\JoyKeys\DirectInputJoy\JoystickAPI.cs

?????文件???????1972??2014-05-12?10:07??Jokstick\JoyKeys\DirectInputJoy\JoystickEventArgs.cs

?????文件??????12387??2014-08-22?13:51??Jokstick\JoyKeys\DirectInputJoy\Joystick_P.cs

?????文件??????11758??2014-08-22?13:54??Jokstick\JoyKeys\DirectInputJoy\Joystick_V.cs

?????文件???????2657??2014-08-27?08:30??Jokstick\JoyKeys\JoyKeys.csproj

?????文件???????5906??2014-08-27?08:30??Jokstick\JoyKeys\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

?????文件???????2993??2014-08-27?08:30??Jokstick\JoyKeys\obj\Debug\JoyKeys.csproj.FileListAbsolute.txt

?????文件??????16896??2014-08-27?08:30??Jokstick\JoyKeys\obj\Debug\JoyKeys.dll

?????文件??????62976??2014-08-27?08:30??Jokstick\JoyKeys\obj\Debug\JoyKeys.pdb

?????文件???????1346??2014-02-20?15:57??Jokstick\JoyKeys\Properties\AssemblyInfo.cs

?????文件???????2658??2014-08-27?08:29??Jokstick\JoyKeys.sln

????..A..H.????489984??2014-08-27?08:31??Jokstick\JoyKeys.suo

?????文件??????16896??2014-08-27?08:30??Jokstick\JoyKeysTest\bin\Debug\JoyKeys.dll

?????文件??????62976??2014-08-27?08:30??Jokstick\JoyKeysTest\bin\Debug\JoyKeys.pdb

?????文件??????14336??2014-08-27?08:30??Jokstick\JoyKeysTest\bin\Debug\JoyKeysTest.exe

?????文件??????34304??2014-08-27?08:30??Jokstick\JoyKeysTest\bin\Debug\JoyKeysTest.pdb

?????文件??????11600??2014-08-27?08:31??Jokstick\JoyKeysTest\bin\Debug\JoyKeysTest.vshost.exe

?????文件????????490??2012-06-02?22:34??Jokstick\JoyKeysTest\bin\Debug\JoyKeysTest.vshost.exe.manifest

?????文件???????6964??2014-08-22?16:49??Jokstick\JoyKeysTest\FormTest.cs

?????文件??????12364??2014-08-22?16:49??Jokstick\JoyKeysTest\FormTest.Designer.cs

?????文件???????6014??2014-08-22?16:48??Jokstick\JoyKeysTest\FormTest.resx

?????文件???????3905??2014-08-22?16:49??Jokstick\JoyKeysTest\JoyKeysTest.csproj

?????文件???????2867??2014-08-22?13:46??Jokstick\JoyKeysTest\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

?????文件???????6391??2014-08-27?08:30??Jokstick\JoyKeysTest\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

?????文件???????1801??2014-08-27?08:31??Jokstick\JoyKeysTest\obj\x86\Debug\JoyKeysTest.csproj.FileListAbsolute.txt

?????文件???????1036??2014-08-27?08:30??Jokstick\JoyKeysTest\obj\x86\Debug\JoyKeysTest.csproj.GenerateResource.Cache

?????文件??????15095??2014-08-27?08:30??Jokstick\JoyKeysTest\obj\x86\Debug\JoyKeysTest.csprojResolveAssemblyReference.cache

............此處省略31個文件信息

評論

共有 條評論