Example #1
0
 private string think(Tool needToMadeTool)
 {
     foreach (Tool tool in AllTools)
     {
         if ((tool.getContent(false) == needToMadeTool.getContent(true))
         && (tool.getPath(true) == currentPathWindowExplorer) && (tool.getContent(true) == currentContentWindowExplorer))
         {
             return (tool.getCommandsInKeys() + needToMadeTool.getCommandsInKeys());
         }
     }
     return null;
 }
Example #2
0
 private ArrayList readFromBase()
 {
     string toolsInString;
     ArrayList tools = new ArrayList();
     StreamReader reader = new StreamReader(Application.StartupPath + @"\toolsBase.txt");
     toolsInString = reader.ReadToEnd();
     toolsInString = toolsInString.Replace("\n", "");
     toolsInString = toolsInString.Replace("\r", "");
     reader.Close();
     string toolString;
     while (toolsInString.IndexOf(" ") != -1) //while tools are
     {
         toolString = toolsInString.Substring(0, toolsInString.IndexOf("endOfTool")); //getting of tool
         toolsInString = toolsInString.Remove(0, toolsInString.IndexOf("endOfTool") + ("endOfTool").Length); //remove tool from tools
         Tool tool = new Tool(toolString);
         tools.Add(tool);
     }
     return tools;
 }
Example #3
0
 private void additionalTools(Tool first, Tool second)
 {
     Tool newTool = new Tool(second.getRecognedSoundCommand(), first.getCommandsInKeys() 
         + second.getCommandsInKeys(), first.getPath(true), first.getContent(true), second.getContent(false), second.getPath(false));
 }
Example #4
0
 //BEGIN appendix function
 private void writeInBase(Tool toolWrite)
 {
     StreamWriter writer = new StreamWriter(Application.StartupPath + @"\toolsBase.txt", true);
     writer.WriteLine(toolWrite.ToStr(toolWrite));
     writer.Close();
 }
Example #5
0
 public void addTool()
 {
     Tool newTool = new Tool(commandInSoundIntroduce, keys, currentPathWindowExplorer, currentContentWindowExplorer, lastContentWindowExplorer, lastPathWindowExplorer);
     AllTools.Add(newTool);
     writeInBase(newTool);
     commandInSoundIntroduce = null;
     keys = null;
     currentContentWindowExplorer = null;
     currentPathWindowExplorer = null;
     lastContentWindowExplorer = null;
     lastPathWindowExplorer = null;
 }