Visual Basic (Declaration) | |
---|---|
Public Function ReplaceMouseTool(Of T As IDiagramTool)( _ ByVal newtool As IDiagramTool, _ ByVal subclass As Boolean _ ) As T |
C# | |
---|---|
public T ReplaceMouseTool<T>( IDiagramTool newtool, bool subclass )where T: IDiagramTool |
Parameters
- newtool
- If the new value is null, any tool that the search finds will just be removed from the list in which it was found.
- subclass
- If true, a matching tool may be a subclass of T; otherwise the tool must be of exactly the same type.
Type Parameters
- T
- this must implement IDiagramTool
Return Value
the old tool that was replaced by the new oneThis searches the MouseDownTools, MouseMoveTools, and MouseUpTools lists. The new tool is inserted into the same list in which a matching tool is found, at the same position as the old tool.