Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 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);
 }