Exemplo n.º 1
0
        public void CopyDirectoryHere(string directoryName, bool performMove)
        {
            string copiedName = Path.Combine(Directory, Path.GetFileName(directoryName));

            if (FileUtility.IsEqualFileName(directoryName, copiedName))
            {
                return;
            }
            if (performMove)
            {
                FileService.RenameFile(directoryName, copiedName, true);
                RecreateSubNodes();
                Expand();
            }
            else
            {
                AddExistingItemsToProject.CopyDirectory(directoryName, this, true);
            }
        }
Exemplo n.º 2
0
        public void CopyDirectoryHere(string directoryName, bool performMove)
        {
            string copiedName = Path.Combine(Directory, Path.GetFileName(directoryName));

            if (FileUtility.IsEqualFileName(directoryName, copiedName))
            {
                return;
            }
            AddExistingItemsToProject.CopyDirectory(directoryName, this, true);
            if (performMove)
            {
                foreach (IViewContent content in WorkbenchSingleton.Workbench.ViewContentCollection)
                {
                    if (content.FileName != null &&
                        FileUtility.IsBaseDirectory(directoryName, content.FileName))
                    {
                        content.FileName = FileUtility.RenameBaseDirectory(content.FileName, directoryName, Path.Combine(this.directory, Path.GetFileName(directoryName)));
                    }
                }
                FileService.RemoveFile(directoryName, true);
            }
        }