public void addProcess(String name, String path, String args) { DataProcess process = new DataProcess(); process.setName(name); process.setPath(path); process.setArgs(args); dataProcesses.Add(process); SaveData(); }
public DataProcess findProcessByPath(String path) { for (int i = 0; i < dataProcesses.Count; i++) { DataProcess process = dataProcesses[i]; if (process.getPath() == path) { return(process); } } return(null); }
public DataProcess findProcessByName(String name) { for (int i = 0; i < dataProcesses.Count; i++) { DataProcess process = dataProcesses[i]; if (process.getName() == name) { return(process); } } return(null); }
public void deleteProcess(String s) { DataProcess process = findProcessByPath(s); if (process == null) { process = findProcessByName(s); } if (process != null) { dataProcesses.Remove(process); } SaveData(); }