Exemple #1
0
 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()));
     }
 }
Exemple #2
0
 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);
 }