Skip to content

Commit c4ef252

Browse files
committed
Merge pull request #2322 from thoemmi/hotkey
[RFC] Hotkey control (reverted from commit 26b8abd)
1 parent 62279ca commit c4ef252

File tree

13 files changed

+17
-448
lines changed

13 files changed

+17
-448
lines changed

MahApps.Metro/Controls/HotKeyBox.cs

Lines changed: 0 additions & 265 deletions
This file was deleted.

MahApps.Metro/MahApps.Metro.NET45.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@
169169
<Compile Include="Controls\Helper\MouseWheelChange.cs" />
170170
<Compile Include="Controls\Helper\MouseWheelState.cs" />
171171
<Compile Include="Controls\Helper\SliderHelper.cs" />
172-
<Compile Include="Controls\HotKeyBox.cs" />
173172
<Compile Include="Controls\Helper\VisibilityHelper.cs" />
174173
<Compile Include="Controls\MetroAnimatedSingleRowTabControl.cs" />
175174
<Compile Include="Controls\MetroAnimatedTabControl.cs" />
@@ -592,10 +591,6 @@
592591
<Generator>MSBuild:Compile</Generator>
593592
<SubType>Designer</SubType>
594593
</Page>
595-
<Page Include="Themes\HotKeyBox.xaml">
596-
<SubType>Designer</SubType>
597-
<Generator>MSBuild:Compile</Generator>
598-
</Page>
599594
<Page Include="Themes\MetroAnimatedSingleRowTabControl.xaml">
600595
<Generator>MSBuild:Compile</Generator>
601596
<SubType>Designer</SubType>

MahApps.Metro/MahApps.Metro.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@
135135
<Compile Include="Controls\Helper\TextBoxHelper.cs" />
136136
<Compile Include="Controls\Helper\ToggleButtonHelper.cs" />
137137
<Compile Include="Controls\Helper\VisibilityHelper.cs" />
138-
<Compile Include="Controls\HotKeyBox.cs" />
139138
<Compile Include="Controls\LayoutInvalidationCatcher.cs" />
140139
<Compile Include="Controls\MetroAnimatedSingleRowTabControl.cs" />
141140
<Compile Include="Controls\MetroAnimatedTabControl.cs" />
@@ -539,10 +538,6 @@
539538
<SubType>Designer</SubType>
540539
<Generator>MSBuild:Compile</Generator>
541540
</Page>
542-
<Page Include="Themes\HotKeyBox.xaml">
543-
<Generator>MSBuild:Compile</Generator>
544-
<SubType>Designer</SubType>
545-
</Page>
546541
<Page Include="Themes\MetroAnimatedSingleRowTabControl.xaml">
547542
<SubType>Designer</SubType>
548543
<Generator>MSBuild:Compile</Generator>

MahApps.Metro/Native/Constants.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -167,17 +167,5 @@ public enum RedrawWindowFlags : uint
167167
public const int WM_MOVE = 0x0003;
168168

169169
public const uint TOPMOST_FLAGS = SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOMOVE | SWP_NOREDRAW | SWP_NOSENDCHANGING;
170-
171-
public const int WM_HOTKEY = 0x0312;
172-
public const int VK_SHIFT = 0x10;
173-
public const int VK_CONTROL = 0x11;
174-
public const int VK_MENU = 0x12;
175-
176-
/* used by UnsafeNativeMethods.MapVirtualKey */
177-
public const uint MAPVK_VK_TO_VSC = 0x00;
178-
public const uint MAPVK_VSC_TO_VK = 0x01;
179-
public const uint MAPVK_VK_TO_CHAR = 0x02;
180-
public const uint MAPVK_VSC_TO_VK_EX = 0x03;
181-
public const uint MAPVK_VK_TO_VSC_EX = 0x04;
182170
}
183171
}

MahApps.Metro/Native/UnsafeNativeMethods.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace MahApps.Metro.Native
1212

1313
/// <devdoc>http://msdn.microsoft.com/en-us/library/ms182161.aspx</devdoc>
1414
[SuppressUnmanagedCodeSecurity]
15-
internal static class UnsafeNativeMethods
15+
internal static class UnsafeNativeMethods
1616
{
1717
/// <devdoc>http://msdn.microsoft.com/en-us/library/windows/desktop/aa969518%28v=vs.85%29.aspx</devdoc>
1818
[DllImport("dwmapi", PreserveSig = false, CallingConvention = CallingConvention.Winapi)]
@@ -227,12 +227,6 @@ internal static Point GetPoint(IntPtr ptr)
227227

228228
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
229229
[DllImport("user32.dll", SetLastError = true)]
230-
internal static extern bool RedrawWindow(IntPtr hWnd, IntPtr lprcUpdate, IntPtr hrgnUpdate, Constants.RedrawWindowFlags flags);
231-
232-
[DllImport("user32.dll")]
233-
internal static extern int MapVirtualKey(uint uCode, uint uMapType);
234-
235-
[DllImport("user32.dll", CharSet = CharSet.Auto)]
236-
internal static extern int GetKeyNameText(int lParam, [MarshalAs(UnmanagedType.LPWStr), Out] StringBuilder str, int size);
230+
internal static extern bool RedrawWindow(IntPtr hWnd, IntPtr lprcUpdate, IntPtr hrgnUpdate, Constants.RedrawWindowFlags flags);
237231
}
238232
}

MahApps.Metro/Themes/Generic.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Themes/TransitioningContentControl.xaml" />
3131
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Themes/WindowButtonCommands.xaml" />
3232
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Themes/WindowCommands.xaml" />
33-
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Themes/HotKeyBox.xaml" />
3433

3534
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Themes/Dialogs/BaseMetroDialog.xaml" />
3635
</ResourceDictionary.MergedDictionaries>

0 commit comments

Comments
 (0)