mirror of https://github.com/icsharpcode/ILSpy.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
809 B
25 lines
809 B
using ICSharpCode.ILSpy.Docking; |
|
using ICSharpCode.ILSpy.ViewModels; |
|
|
|
namespace ICSharpCode.ILSpy.Commands |
|
{ |
|
class ToolPaneCommand(string contentId, DockWorkspace dockWorkspace) : SimpleCommand |
|
{ |
|
public override void Execute(object parameter) |
|
{ |
|
dockWorkspace.ShowToolPane(contentId); |
|
} |
|
} |
|
|
|
class TabPageCommand(TabPageModel model, DockWorkspace dockWorkspace) : SimpleCommand |
|
{ |
|
public override void Execute(object parameter) |
|
{ |
|
// ensure the tab control is focused before setting the active tab page, else the tab will not be focused |
|
dockWorkspace.ActiveTabPage?.Focus(); |
|
// reset first, else clicking on the already active tab will not focus the tab and the menu checkmark will not be updated |
|
dockWorkspace.ActiveTabPage = null; |
|
dockWorkspace.ActiveTabPage = model; |
|
} |
|
} |
|
} |