/// <summary> /// Get the full parameter string for either DiscImageCreator or Aaru /// </summary> /// <param name="driveSpeed">Nullable int representing the drive speed</param> /// <returns>String representing the params, null on error</returns> public string GetFullParameters(int?driveSpeed) { // Populate with the correct params for inputs (if we're not on the default option) if (System != null && Type != MediaType.NONE) { // If drive letter is invalid, skip this if (Drive == null) { return(null); } // Set the proper parameters string filename = OutputDirectory + Path.DirectorySeparatorChar + OutputFilename; switch (Options.InternalProgram) { case InternalProgram.Aaru: Parameters = new Modules.Aaru.Parameters(System, Type, Drive.Letter, filename, driveSpeed, Options); break; case InternalProgram.DD: Parameters = new Modules.DD.Parameters(System, Type, Drive.Letter, filename, driveSpeed, Options); break; case InternalProgram.DiscImageCreator: Parameters = new Modules.DiscImageCreator.Parameters(System, Type, Drive.Letter, filename, driveSpeed, Options); break; // This should never happen, but it needs a fallback default: Parameters = new Modules.DiscImageCreator.Parameters(System, Type, Drive.Letter, filename, driveSpeed, Options); break; } // Generate and return the param string return(Parameters.GenerateParameters()); } return(null); }