public void setProgramInUse(string prgName) { if (MatchingProgram.ProgramExists(prgName)) { ProgramInUse = new MatchingProgram(prgName); } else { throw new Exception(LocRM.GetString("file", currentCulture) + ProgramInUse.ProgramName + ".prg" + LocRM.GetString("notFoundIn", currentCulture) + Path.GetDirectoryName(MatchingProgram.GetProgramsPath())); } }
public bool AddMatchingProgram(string programName) { try { if (MatchingProgram.ProgramExists(programName)) { MatchingProgram newProgram = new MatchingProgram(programName); ProgramList.Add(newProgram); } else { throw new MissingMemberException(programName + " (" + LocRM.GetString("matchingTest", currentCulture) + ")"); } } catch (FileNotFoundException) { return(false); } return(true); }