/// <summary> /// Checks to see if the files are moving to a new location and whether /// they should have the .deploy extension added, then calls the /// appropriate helper method. /// </summary> /// <param name="fileNames">Collection of files to add</param> /// <param name="targetPath">Destination folder for the files</param> private void AddFiles(string[] fileNames, string targetPath) { // Get the source folder string filePath = Path.GetDirectoryName(fileNames[0]).ToLower(); // See if it is same as targetPath if (filePath == targetPath.ToLower()) { // Check whether to add .deploy extension DialogResult promptResult = MessageBox.Show("Add .deploy extension to those files that do not already have it?", "Add Extension?", MessageBoxButtons.YesNo); bool addDeployExtension = (promptResult == DialogResult.Yes); ManifestHelper.AddFilesInPlace(fileNames, addDeployExtension, m_Files, m_AppManifest); } else { // Copy, add extension if needed, and add to manifest ManifestHelper.AddFilesToTargetFolder(fileNames, targetPath, m_Files, m_AppManifest); } }