// replaces tags and text when writing settings to the files private static void RemoveFromSettings(string tag, string outputFileName) { var location = RobotFileHandler.LocationInSettings(outputFileName, tag); if (location[0] != -1) { RobotFileHandler.FileLineRemove(outputFileName , location); } }
// replaces tags and text when writing settings to the files private static void ReplaceInSettings(string replacementText, string tag, string outputFileName) { var location = RobotFileHandler.LocationInSettings(outputFileName, tag); //Add settings tag if not present in the file if (RobotFileHandler.HasTag(outputFileName, FormType.Settings) == -1) { RobotFileHandler.FileLineAdd("*** Settings ***", outputFileName, 0); RobotFileHandler.FileLineAdd("", outputFileName, 1); } if (location[0] == -1) { RobotFileHandler.FileLineAdd(replacementText , outputFileName , 1); } else { RobotFileHandler.FileLineReplace(replacementText , outputFileName , location); } }