コード例 #1
0
ファイル: Configuration.cs プロジェクト: intvsteve/VINTage
        /// <summary>
        /// Gets the absolute path to the specified program.
        /// </summary>
        /// <param name="program">The program whose absolute path is being retrieved.</param>
        /// <returns>The absolute path of the program.</returns>
        /// <remarks>This method is not symmetric with SetProgramPath -- it returns the absolute path to the requested program in full.</remarks>
        public string GetProgramPath(ProgramFile program)
        {
            string programPath;

            if (_programPaths.TryGetValue(program, out programPath))
            {
                programPath = System.IO.Path.Combine(programPath, program.ProgramName()) + ProgramSuffix;
                IRomHelpers.SetConfigurationEntry(program.ToString(), programPath); // ensure it's registered w/ INTV.Core
            }
            return(programPath);
        }
コード例 #2
0
 /// <summary>
 /// Gets the name of a program given a ProgramFile with the appropriate suffix.
 /// </summary>
 /// <param name="program">The program whose executable name is desired.</param>
 /// <returns>The name of the executable file.</returns>
 public static string ProgramNameWithSuffix(this ProgramFile program)
 {
     return(program.ProgramName() + Configuration.ProgramSuffix);
 }