/// <summary> /// Hide or unhide tool. /// </summary> /// <param name="tool">Tool.</param> /// <param name="hide">Specify a value of <c>true</c> to hide tool; otherwise /// a value of <c>false</c> to unhide tool.</param> public static void HideTool(ToolBase tool, bool hide) { if (tool._visible == !hide) { return; } tool._visible = !hide; if (hide) { Hidden.Value.Add(tool.GetType().FullName); } else { Hidden.Value.Remove(tool.GetType().FullName); } Hidden.MarkDirty(); }
/// <summary> /// Gets a value indicating whether tool is hidden. /// </summary> /// <param name="tool">Tool.</param> /// <returns> /// A value of <c>true</c> if tool is hidden; otherwise a value of <c>false</c>. /// </returns> public static bool IsToolHidden(ToolBase tool) { return(Hidden.Value.Contains(tool.GetType().FullName)); }