Example #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()));
     }
 }
Example #2
0
        public void setProgramInUse(string path, string prgName)
        {
            string programFile = path + prgName + ".prg";

            if (File.Exists(programFile))
            {
                ProgramInUse = new MatchingProgram(programFile);
            }
            else
            {
                throw new Exception(LocRM.GetString("file", currentCulture) + ProgramInUse.ProgramName + ".prg" +
                                    LocRM.GetString("notFoundIn", currentCulture) + Path.GetDirectoryName(path + "/prg/"));
            }
        }
 public bool AddMatchingProgram(string programName)
 {
     try
     {
         if (!File.Exists(Global.matchingTestFilesPath + Global.programFolderName + programName + ".prg"))
         {
             throw new MissingMemberException(programName + " (" + LocRM.GetString("matchingTest", currentCulture) + ")");
         }
         ;
         MatchingProgram newProgram = new MatchingProgram(Global.matchingTestFilesPath + Global.programFolderName + programName + ".prg");
         ProgramList.Add(newProgram);
     }
     catch (FileNotFoundException)
     {
         return(false);
     }
     return(true);
 }
Example #4
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);
 }