Chapter 13: Extending Visual Studio 2010 | 395 |
", Shortcut: " + bindingStr + "\n");
}
}
handled = true;
VB:
For Each cmd As Command In _applicationObject.Commands
Dim cmdBindings As Object() =
CType(cmd.Bindings, Object())
If cmdBindings.Length > 0 Then
Dim bindingStr As String =
String.Join(", ", cmdBindings)
outPane.OutputString( "Command: " & cmd.Name &
", Shortcut: " & bindingStr & Environment.NewLine)
End If
Next
handled = True
Notice how we set handled to true, letting VS know that the code recognized and acted on the command. Besides letting users execute the
Setting Status with QueryStatus
While VS is working with your
Listing 13-4 The QueryStatus method
C#:
public void QueryStatus( string commandName,