Changeset 342
- Timestamp:
- 10/23/07 22:26:35 (15 months ago)
- Location:
- Apple Wireless Keyboard Helper/trunk
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
Apple Wireless Keyboard Helper/trunk/Misuzilla.Applications.AppleWirelessKeyboardHelper.sln
r326 r342 18 18 {A4D4C6B9-6641-4B3D-A023-27C8EC699F9C}.Debug|x86.ActiveCfg = Debug|x86 19 19 {A4D4C6B9-6641-4B3D-A023-27C8EC699F9C}.Debug|x86.Build.0 = Debug|x86 20 {A4D4C6B9-6641-4B3D-A023-27C8EC699F9C}.Release|Any CPU.ActiveCfg = Release| Any CPU21 {A4D4C6B9-6641-4B3D-A023-27C8EC699F9C}.Release|Any CPU.Build.0 = Release| Any CPU20 {A4D4C6B9-6641-4B3D-A023-27C8EC699F9C}.Release|Any CPU.ActiveCfg = Release|x86 21 {A4D4C6B9-6641-4B3D-A023-27C8EC699F9C}.Release|Any CPU.Build.0 = Release|x86 22 22 {A4D4C6B9-6641-4B3D-A023-27C8EC699F9C}.Release|x86.ActiveCfg = Release|x86 23 23 {A4D4C6B9-6641-4B3D-A023-27C8EC699F9C}.Release|x86.Build.0 = Release|x86 -
Apple Wireless Keyboard Helper/trunk/Misuzilla.Applications.AppleWirelessKeyboardHelper/Helper.cs
r335 r342 1 1 using System; 2 using System.Collections.Generic; 3 using System.Text; 2 using System.Diagnostics; 4 3 using System.IO; 5 using System. Diagnostics;4 using System.Runtime.InteropServices; 6 5 using System.Windows.Forms; 7 using System.Runtime.InteropServices;8 6 using Microsoft.Win32.SafeHandles; 9 10 7 using WiimoteLib; 11 8 … … 47 44 { 48 45 HIDImports.SP_DEVICE_INTERFACE_DETAIL_DATA diDetail = new HIDImports.SP_DEVICE_INTERFACE_DETAIL_DATA(); 49 diDetail.cbSize = (IntPtr.Size == 8) ? (UInt32)8 : (UInt32)5; // x64:8, x86:550 51 UInt32 size = 0;46 diDetail.cbSize = (IntPtr.Size == 8) ? (UInt32)8 : 5; // x64:8, x86:5 47 48 UInt32 size; 52 49 HIDImports.SetupDiGetDeviceInterfaceDetail(hDevInfo, ref diData, IntPtr.Zero, 0, out size, IntPtr.Zero); 53 50 if (HIDImports.SetupDiGetDeviceInterfaceDetail(hDevInfo, ref diData, ref diDetail, size, out size, IntPtr.Zero)) … … 162 159 } 163 160 164 165 161 Byte[] buffer = ar.AsyncState as Byte[]; 166 167 162 foreach (Byte b in buffer) 168 163 Debug.Write(String.Format("{0:x2} ", b)); … … 170 165 if (buffer[0] == 0x11) 171 166 { 172 Debug.Write((AppleKeyboardKeys) buffer[1]);173 CurrentKeyState = (AppleKeyboardKeys) buffer[1];167 Debug.Write((AppleKeyboardKeys) buffer[1]); 168 CurrentKeyState = (AppleKeyboardKeys) buffer[1]; 174 169 } 175 170 else if (buffer[0] == 0x13) -
Apple Wireless Keyboard Helper/trunk/Misuzilla.Applications.AppleWirelessKeyboardHelper/Program.cs
r340 r342 1 1 using System; 2 using System.Diagnostics; 2 3 using System.IO; 4 using System.Reflection; 3 5 using System.Text; 4 using System.Collections.Generic;5 using System.Diagnostics;6 using System.Runtime.InteropServices;7 using System.Reflection;8 6 using System.Windows.Forms; 9 10 7 using IronPython; 11 8 using Microsoft.Scripting; … … 23 20 24 21 //[STAThread] 25 static void Main( string[] args)22 static void Main() 26 23 { 27 24 using (Helper helper = new Helper()) … … 55 52 }; 56 53 57 helper.Disconnected += delegate (Object sender, EventArgs e)54 helper.Disconnected += delegate 58 55 { 59 56 ShowBalloonTip(Resources.Strings.KeyboardDisconnected, ToolTipIcon.Warning); … … 175 172 _notifyIcon.Visible = true; 176 173 _notifyIcon.ContextMenu = new ContextMenu(new MenuItem[]{ 177 new MenuItem(Resources.Strings.MenuItemReloadScripts, delegate (Object sender, EventArgs e){174 new MenuItem(Resources.Strings.MenuItemReloadScripts, delegate { 178 175 LoadScripts(); 179 176 }) 180 177 , new MenuItem("-") 181 , new MenuItem(Resources.Strings.MenuItemExit, delegate (Object sender, EventArgs e){178 , new MenuItem(Resources.Strings.MenuItemExit, delegate { 182 179 Application.Exit(); 183 180 })
