diff --git a/ILSpy/Commands/ShowDebugSteps.cs b/ILSpy/Commands/ShowDebugSteps.cs deleted file mode 100644 index 21f1c069e..000000000 --- a/ILSpy/Commands/ShowDebugSteps.cs +++ /dev/null @@ -1,18 +0,0 @@ -#if DEBUG - -using ICSharpCode.ILSpy.Docking; -using ICSharpCode.ILSpy.Properties; -using ICSharpCode.ILSpy.ViewModels; - -namespace ICSharpCode.ILSpy.Commands -{ - [ExportMainMenuCommand(Menu = nameof(Resources._View), Header = nameof(Resources._ShowDebugSteps), MenuOrder = 5000)] - class ShowDebugSteps : SimpleCommand - { - public override void Execute(object parameter) - { - DockWorkspace.Instance.ShowToolPane(DebugStepsPaneModel.PaneContentId); - } - } -} -#endif \ No newline at end of file diff --git a/ILSpy/Commands/ShowPane.cs b/ILSpy/Commands/ShowPane.cs new file mode 100644 index 000000000..2a5b14030 --- /dev/null +++ b/ILSpy/Commands/ShowPane.cs @@ -0,0 +1,35 @@ +using ICSharpCode.ILSpy.Docking; +using ICSharpCode.ILSpy.Properties; +using ICSharpCode.ILSpy.ViewModels; + +namespace ICSharpCode.ILSpy.Commands +{ + [ExportMainMenuCommand(Menu = nameof(Resources._Window), Header = nameof(Resources._Assemblies), MenuCategory = "pane", MenuOrder = 5000)] + class ShowAssemblies : SimpleCommand + { + public override void Execute(object parameter) + { + DockWorkspace.Instance.ShowToolPane(AssemblyListPaneModel.PaneContentId); + } + } + + [ExportMainMenuCommand(Menu = nameof(Resources._Window), Header = nameof(Resources._Analyzer), MenuCategory = "pane", MenuOrder = 5000)] + class ShowAnalyzer : SimpleCommand + { + public override void Execute(object parameter) + { + DockWorkspace.Instance.ShowToolPane(AnalyzerPaneModel.PaneContentId); + } + } + +#if DEBUG + [ExportMainMenuCommand(Menu = nameof(Resources._Window), Header = nameof(Resources._ShowDebugSteps), MenuCategory = "pane", MenuOrder = 5000)] + class ShowDebugSteps : SimpleCommand + { + public override void Execute(object parameter) + { + DockWorkspace.Instance.ShowToolPane(DebugStepsPaneModel.PaneContentId); + } + } +#endif +} \ No newline at end of file diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index 7ade3618d..d0b19b041 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -134,6 +134,6 @@ - + diff --git a/ILSpy/MainWindow.xaml b/ILSpy/MainWindow.xaml index 36b0649f0..8a20d45cb 100644 --- a/ILSpy/MainWindow.xaml +++ b/ILSpy/MainWindow.xaml @@ -107,7 +107,7 @@ - + diff --git a/ILSpy/MainWindow.xaml.cs b/ILSpy/MainWindow.xaml.cs index c6279fcd7..7f1c9070d 100644 --- a/ILSpy/MainWindow.xaml.cs +++ b/ILSpy/MainWindow.xaml.cs @@ -371,6 +371,29 @@ namespace ICSharpCode.ILSpy } #endregion + protected override void OnKeyDown(KeyEventArgs e) + { + base.OnKeyDown(e); + if (!e.Handled && e.KeyboardDevice.Modifiers == ModifierKeys.Alt && e.Key == Key.System) + { + switch (e.SystemKey) + { + case Key.A: + assemblyListComboBox.Focus(); + e.Handled = true; + break; + case Key.L: + languageComboBox.Focus(); + e.Handled = true; + break; + case Key.E: // Alt+V was already taken by _View menu + languageVersionComboBox.Focus(); + e.Handled = true; + break; + } + } + } + public AssemblyList CurrentAssemblyList { get { return assemblyList; } } diff --git a/ILSpy/Properties/Resources.Designer.cs b/ILSpy/Properties/Resources.Designer.cs index 0d803c490..48bfc9c98 100644 --- a/ILSpy/Properties/Resources.Designer.cs +++ b/ILSpy/Properties/Resources.Designer.cs @@ -78,6 +78,24 @@ namespace ICSharpCode.ILSpy.Properties { } } + /// + /// Looks up a localized string similar to Analy_zer. + /// + public static string _Analyzer { + get { + return ResourceManager.GetString("_Analyzer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to _Assemblies. + /// + public static string _Assemblies { + get { + return ResourceManager.GetString("_Assemblies", resourceCulture); + } + } + /// /// Looks up a localized string similar to _Check for Updates. /// @@ -1703,15 +1721,6 @@ namespace ICSharpCode.ILSpy.Properties { } } - /// - /// Looks up a localized string similar to Language. - /// - public static string Language { - get { - return ResourceManager.GetString("Language", resourceCulture); - } - } - /// /// Looks up a localized string similar to Are you sure that you want to delete the selected assembly list?. /// @@ -2229,7 +2238,7 @@ namespace ICSharpCode.ILSpy.Properties { } /// - /// Looks up a localized string similar to Select a list of assemblies. + /// Looks up a localized string similar to Select a list of assemblies (Alt+A). /// public static string SelectAssemblyListDropdownTooltip { get { @@ -2238,7 +2247,7 @@ namespace ICSharpCode.ILSpy.Properties { } /// - /// Looks up a localized string similar to Select language to decompile to. + /// Looks up a localized string similar to Select language to decompile to (Alt+L). /// public static string SelectLanguageDropdownTooltip { get { @@ -2265,7 +2274,7 @@ namespace ICSharpCode.ILSpy.Properties { } /// - /// Looks up a localized string similar to Select version of language to output. + /// Looks up a localized string similar to Select version of language to output (Alt+E). /// public static string SelectVersionDropdownTooltip { get { @@ -2552,6 +2561,15 @@ namespace ICSharpCode.ILSpy.Properties { } } + /// + /// Looks up a localized string similar to UI Language. + /// + public static string UILanguage { + get { + return ResourceManager.GetString("UILanguage", resourceCulture); + } + } + /// /// Looks up a localized string similar to System. /// diff --git a/ILSpy/Properties/Resources.resx b/ILSpy/Properties/Resources.resx index e89e582d7..74fa044d9 100644 --- a/ILSpy/Properties/Resources.resx +++ b/ILSpy/Properties/Resources.resx @@ -594,9 +594,6 @@ Are you sure you want to continue? Insert using declarations - - Language - Are you sure that you want to delete the selected assembly list? @@ -772,10 +769,10 @@ Do you want to continue? Select assemblies to open: - Select a list of assemblies + Select a list of assemblies (Alt+A) - Select language to decompile to + Select language to decompile to (Alt+L) Select a list: @@ -784,7 +781,7 @@ Do you want to continue? Select PDB... - Select version of language to output + Select version of language to output (Alt+E) You must restart ILSpy for the change to take effect. @@ -879,6 +876,9 @@ Do you want to continue? Type + + UI Language + System @@ -942,6 +942,12 @@ Do you want to continue? _Add To Main List + + Analy_zer + + + _Assemblies + _Check for Updates diff --git a/ILSpy/Properties/Resources.zh-Hans.resx b/ILSpy/Properties/Resources.zh-Hans.resx index 594ac91ee..fb8c6cc94 100644 --- a/ILSpy/Properties/Resources.zh-Hans.resx +++ b/ILSpy/Properties/Resources.zh-Hans.resx @@ -585,9 +585,6 @@ 插入使用声明 - - 语言 - 是否删除选中的程序集列表? @@ -858,6 +855,9 @@ 类型 + + 语言 + 系统 diff --git a/ILSpy/Search/SearchPane.cs b/ILSpy/Search/SearchPane.cs index 54fc2cad9..5c446c9bf 100644 --- a/ILSpy/Search/SearchPane.cs +++ b/ILSpy/Search/SearchPane.cs @@ -397,7 +397,7 @@ namespace ICSharpCode.ILSpy } } - [ExportMainMenuCommand(Menu = nameof(Properties.Resources._View), Header = nameof(Properties.Resources.Search), MenuIcon = "Images/Search", MenuCategory = nameof(Properties.Resources.View), MenuOrder = 100)] + [ExportMainMenuCommand(Menu = nameof(Properties.Resources._Window), Header = nameof(Properties.Resources.Search), MenuIcon = "Images/Search", MenuCategory = "pane", MenuOrder = 100)] [ExportToolbarCommand(ToolTip = nameof(Properties.Resources.SearchCtrlShiftFOrCtrlE), ToolbarIcon = "Images/Search", ToolbarCategory = nameof(Properties.Resources.View), ToolbarOrder = 100)] sealed class ShowSearchCommand : CommandWrapper {