WingMan – Diff between revs 8 and 10

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 8 Rev 10
Line -... Line 1...
-   1 using System.Collections.Generic;
1 using System.Windows.Forms; 2 using System.Windows.Forms;
Line 2... Line 3...
2   3  
3 namespace WingMan 4 namespace WingMan
4 { 5 {
5 public static class KeyConversion 6 public static class KeyConversion
6 { 7 {
7 public static string ToDisplayName(this MouseButtons button) -  
8 { 8 public static readonly Dictionary<MouseButtons, string> MouseButtonsToString =
9 var mouseButton = string.Empty; -  
10 switch (button) 9 new Dictionary<MouseButtons, string>
11 { -  
12 case MouseButtons.Left: 10 {
13 mouseButton = "Left Mouse Button"; -  
14 break; -  
15 case MouseButtons.Middle: 11 {MouseButtons.Left, "Left Mouse Button"},
16 mouseButton = "Middle Mouse Button"; -  
17 break; -  
18 case MouseButtons.Right: 12 {MouseButtons.Middle, "Middle Mouse Button"},
19 mouseButton = "Right Mouse Button"; -  
20 break; 13 {MouseButtons.Right, "Right Mouse Button"}
Line -... Line 14...
-   14 };
21 } 15  
-   16 public static readonly Dictionary<string, MouseButtons> StringToMouseButtons =
-   17 new Dictionary<string, MouseButtons>
-   18 {
-   19 {"Left Mouse Button", MouseButtons.Left},
22   20 {"Middle Mouse Button", MouseButtons.Middle},
Line 23... Line 21...
23 return mouseButton; 21 {"Right Mouse Button", MouseButtons.Right}
24 } 22 };
Line -... Line 196...
-   196 {"Pa1", 253},
-   197 {"OemClear", 254}
-   198 };
-   199  
-   200 public static readonly Dictionary<byte, string> KeysToString = new Dictionary<byte, string>
-   201 {
-   202 {0, "None"},
-   203 {1, "LButton"},
-   204 {2, "RButton"},
-   205 {3, "Cancel"},
-   206 {4, "MButton"},
-   207 {5, "XButton1"},
-   208 {6, "XButton2"},
-   209 {8, "Back"},
-   210 {9, "Tab"},
-   211 {10, "LineFeed"},
-   212 {12, "Clear"},
-   213 {13, "Enter"},
-   214 {16, "ShiftKey"},
-   215 {17, "ControlKey"},
-   216 {18, "Menu"},
-   217 {19, "Pause"},
-   218 {20, "CapsLock"},
-   219 {21, "HanguelMode"},
-   220 {23, "JunjaMode"},
-   221 {24, "FinalMode"},
-   222 {25, "KanjiMode"},
-   223 {27, "Escape"},
-   224 {28, "IMEConvert"},
-   225 {29, "IMENonconvert"},
-   226 {30, "IMEAccept"},
-   227 {31, "IMEModeChange"},
-   228 {32, "Space"},
-   229 {33, "PageUp"},
-   230 {34, "PageDown"},
-   231 {35, "End"},
-   232 {36, "Home"},
-   233 {37, "Left"},
-   234 {38, "Up"},
417 default: 235 {39, "Right"},
-   236 {40, "Down"},
-   237 {41, "Select"},
-   238 {42, "Print"},
-   239 {43, "Execute"},
-   240 {44, "PrintScreen"},
-   241 {45, "Insert"},
-   242 {46, "Delete"},
-   243 {47, "Help"},
-   244 {48, "D0"},
-   245 {49, "D1"},
-   246 {50, "D2"},
-   247 {51, "D3"},
-   248 {52, "D4"},
-   249 {53, "D5"},
-   250 {54, "D6"},
-   251 {55, "D7"},
-   252 {56, "D8"},
-   253 {57, "D9"},
-   254 {65, "A"},
-   255 {66, "B"},
-   256 {67, "C"},
-   257 {68, "D"},
-   258 {69, "E"},
-   259 {70, "F"},
-   260 {71, "G"},
-   261 {72, "H"},
-   262 {73, "I"},
-   263 {74, "J"},
-   264 {75, "K"},
-   265 {76, "L"},
-   266 {77, "M"},
-   267 {78, "N"},
-   268 {79, "O"},
-   269 {80, "P"},
-   270 {81, "Q"},
-   271 {82, "R"},
-   272 {83, "S"},
-   273 {84, "T"},
-   274 {85, "U"},
-   275 {86, "V"},
-   276 {87, "W"},
-   277 {88, "X"},
-   278 {89, "Y"},
-   279 {90, "Z"},
-   280 {91, "LWin"},
-   281 {92, "RWin"},
-   282 {93, "Apps"},
-   283 {95, "Sleep"},
-   284 {96, "NumPad0"},
-   285 {97, "NumPad1"},
-   286 {98, "NumPad2"},
-   287 {99, "NumPad3"},
-   288 {100, "NumPad4"},
-   289 {101, "NumPad5"},
-   290 {102, "NumPad6"},
-   291 {103, "NumPad7"},
-   292 {104, "NumPad8"},
-   293 {105, "NumPad9"},
-   294 {106, "Multiply"},
-   295 {107, "Add"},
-   296 {108, "Separator"},
-   297 {109, "Subtract"},
-   298 {110, "Decimal"},
-   299 {111, "Divide"},
-   300 {112, "F1"},
-   301 {113, "F2"},
-   302 {114, "F3"},
-   303 {115, "F4"},
-   304 {116, "F5"},
-   305 {117, "F6"},
-   306 {118, "F7"},
-   307 {119, "F8"},
-   308 {120, "F9"},
-   309 {121, "F10"},
-   310 {122, "F11"},
-   311 {123, "F12"},
-   312 {124, "F13"},
-   313 {125, "F14"},
-   314 {126, "F15"},
-   315 {127, "F16"},
-   316 {128, "F17"},
-   317 {129, "F18"},
-   318 {130, "F19"},
-   319 {131, "F20"},
-   320 {132, "F21"},
-   321 {133, "F22"},
-   322 {134, "F23"},
-   323 {135, "F24"},
-   324 {144, "NumLock"},
-   325 {145, "Scroll"},
-   326 {160, "LShiftKey"},
-   327 {161, "RShiftKey"},
-   328 {162, "LControlKey"},
-   329 {163, "RControlKey"},
-   330 {164, "LMenu"},
-   331 {165, "RMenu"},
-   332 {166, "BrowserBack"},
-   333 {167, "BrowserForward"},
-   334 {168, "BrowserRefresh"},
-   335 {169, "BrowserStop"},
-   336 {170, "BrowserSearch"},
-   337 {171, "BrowserFavorites"},
-   338 {172, "BrowserHome"},
-   339 {173, "VolumeMute"},
-   340 {174, "VolumeDown"},
-   341 {175, "VolumeUp"},
-   342 {176, "MediaNextTrack"},
-   343 {177, "MediaPreviousTrack"},
-   344 {178, "MediaStop"},
-   345 {179, "MediaPlayPause"},
-   346 {180, "LaunchMail"},
-   347 {181, "SelectMedia"},
-   348 {182, "LaunchApplication1"},
-   349 {183, "LaunchApplication2"},
-   350 {186, "Oem1"},
-   351 {187, "Oemplus"},
-   352 {188, "Oemcomma"},
-   353 {189, "OemMinus"},
-   354 {190, "OemPeriod"},
-   355 {191, "Oem2"},
-   356 {192, "Oem3"},
-   357 {219, "Oem4"},
-   358 {220, "Oem5"},
-   359 {221, "Oem6"},
-   360 {222, "Oem7"},
-   361 {223, "Oem8"},
-   362 {226, "Oem102"},
-   363 {229, "ProcessKey"},
-   364 {231, "Packet"},
-   365 {246, "Attn"},
-   366 {247, "Crsel"},
-   367 {248, "Exsel"},
-   368 {249, "EraseEof"},
-   369 {250, "Play"},
418 break; 370 {251, "Zoom"},
419 } 371 {252, "NoName"},
420   372 {253, "Pa1"},