示例#1
0
 /// <summary>
 /// Remove old tool (if present) and activate new. If <paramref name="tool"/> is null
 /// the current active tool is removed.
 /// </summary>
 /// <typeparam name="T">Type of the tool passed to this method.</typeparam>
 /// <param name="tool">New top level tool to activate - null is equal to RemoveActiveTool.</param>
 /// <returns>The new tool.</returns>
 public static T ActivateTool <T>(Tool tool) where T : Tool
 {
     return(ActivateTool(tool) as T);
 }