From 54819eb367a896e52868594e969e1991fa6a2e93 Mon Sep 17 00:00:00 2001 From: Yeechan Lu Date: Sun, 26 Jan 2014 02:13:52 +0800 Subject: [PATCH] Use the NuGet version of InputSimulator --- WinAlfred/MainWindow.xaml.cs | 6 +- WinAlfred/WinAlfred.csproj | 553 ++++++++++++++++++----------------- WinAlfred/packages.config | 9 +- 3 files changed, 287 insertions(+), 281 deletions(-) diff --git a/WinAlfred/MainWindow.xaml.cs b/WinAlfred/MainWindow.xaml.cs index 897d9445b..75a6d2b76 100644 --- a/WinAlfred/MainWindow.xaml.cs +++ b/WinAlfred/MainWindow.xaml.cs @@ -29,7 +29,9 @@ namespace WinAlfred SelectedRecords selectedRecords = new SelectedRecords(); private KeyboardListener keyboardListener = new KeyboardListener(); - private bool WinRStroked = false; + private bool WinRStroked = false; + + private WindowsInput.KeyboardSimulator keyboardSimulator = new WindowsInput.KeyboardSimulator(new WindowsInput.InputSimulator()); public MainWindow() { @@ -245,7 +247,7 @@ namespace WinAlfred if (keyevent == KeyEvent.WM_KEYUP && WinRStroked && vkcode == (int)Keys.LWin) { WinRStroked = false; - WindowsInput.InputSimulator.SimulateModifiedKeyStroke(WindowsInput.VirtualKeyCode.LWIN, WindowsInput.VirtualKeyCode.CONTROL); + keyboardSimulator.ModifiedKeyStroke(WindowsInput.Native.VirtualKeyCode.LWIN, WindowsInput.Native.VirtualKeyCode.CONTROL); return false; } } diff --git a/WinAlfred/WinAlfred.csproj b/WinAlfred/WinAlfred.csproj index 9fe39639d..e4a02b11d 100644 --- a/WinAlfred/WinAlfred.csproj +++ b/WinAlfred/WinAlfred.csproj @@ -1,284 +1,287 @@ - - - - - Debug - AnyCPU - {DB90F671-D861-46BB-93A3-F1304F5BA1C5} - WinExe - Properties - WinAlfred - WinAlfred - v3.5 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - ..\ - true - - 发布\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - app.ico - - - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - - - bin\x64\Release\ - TRACE - true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - - WinAlfred.EntryPoint - - - - - C:\Users\Scott\Desktop\InputSimulator.dll - - - ..\packages\log4net.2.0.3\lib\net35-full\log4net.dll - - - - ..\packages\Newtonsoft.Json.5.0.8\lib\net35\Newtonsoft.Json.dll - - - - - - - - - - - - - - - - - - - - - - - MSBuild:Compile - Designer - - - - - - - - - - - - - - - Msg.xaml - - - - - - - - - - ResultPanel.xaml - - - ResultItem.xaml - - - - SettingWindow.xaml - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - MainWindow.xaml - Code - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - Designer - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - {097b4ac0-74e9-4c58-bcf8-c69746ec8271} - Python.Runtime - - - {69ce0206-cb41-453d-88af-df86092ef9b8} - WinAlfred.Plugin.System - - - {8451ECDD-2EA4-4966-BB0A-7BBC40138E80} - WinAlfred.Plugin - - - - - - - - - - - - - - Always - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - - - - - - - - - - - - - - - + + + + + Debug + AnyCPU + {DB90F671-D861-46BB-93A3-F1304F5BA1C5} + WinExe + Properties + WinAlfred + WinAlfred + v3.5 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + ..\ + true + + 发布\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + app.ico + + + true + bin\x64\Debug\ + DEBUG;TRACE + full + x64 + prompt + MinimumRecommendedRules.ruleset + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + prompt + MinimumRecommendedRules.ruleset + + + WinAlfred.EntryPoint + + + + + C:\Users\Scott\Desktop\InputSimulator.dll + + + ..\packages\log4net.2.0.3\lib\net35-full\log4net.dll + + + + ..\packages\Newtonsoft.Json.5.0.8\lib\net35\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + + + ..\packages\InputSimulator.1.0.4.0\lib\net20\WindowsInput.dll + + + + + MSBuild:Compile + Designer + + + + + + + + + + + + + + + Msg.xaml + + + + + + + + + + ResultPanel.xaml + + + ResultItem.xaml + + + + SettingWindow.xaml + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + Designer + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + {097b4ac0-74e9-4c58-bcf8-c69746ec8271} + Python.Runtime + + + {69ce0206-cb41-453d-88af-df86092ef9b8} + WinAlfred.Plugin.System + + + {8451ECDD-2EA4-4966-BB0A-7BBC40138E80} + WinAlfred.Plugin + + + + + + + + + + + + + + Always + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + + + + + + + + + + + + + + + xcopy /Y $(ProjectDir)Images\*.* $(TargetDir)Images\ xcopy /Y $(ProjectDir)app.ico $(TargetDir) -xcopy /Y $(ProjectDir)Themes\*.* $(TargetDir)Themes\ - +xcopy /Y $(ProjectDir)Themes\*.* $(TargetDir)Themes\ + + --> \ No newline at end of file diff --git a/WinAlfred/packages.config b/WinAlfred/packages.config index 0db9c4556..f46c1ba8d 100644 --- a/WinAlfred/packages.config +++ b/WinAlfred/packages.config @@ -1,5 +1,6 @@ - - - - + + + + + \ No newline at end of file