public bool InsertTool(int index, ITool tool) { if (ToolsDic != null) { if (!ToolsDic.ContainsKey(tool.ToolName)) { ToolsDic.Add(tool.ToolName, tool); ToolList.Insert(index, tool); return(true); } } return(false); }
public bool AddTool(ITool tool) { if (ToolsDic != null) { if (!ToolsDic.ContainsKey(tool.ToolName)) { ToolsDic.Add(tool.ToolName, tool); ToolList.Add(tool); return(true); } } return(false); }