public override void Paste() { IDataObject dataObject = ClipboardWrapper.GetDataObject(); if (dataObject == null) { return; } if (dataObject.GetDataPresent(DataFormats.FileDrop)) { string[] files = (string[])dataObject.GetData(DataFormats.FileDrop); foreach (string fileName in files) { if (System.IO.Directory.Exists(fileName)) { if (!FileUtility.IsBaseDirectory(fileName, Directory)) { CopyDirectoryHere(fileName, false); } } else { CopyFileHere(fileName, false); } } } else if (dataObject.GetDataPresent(typeof(FileNode))) { FileOperationClipboardObject clipboardObject = (FileOperationClipboardObject)dataObject.GetData(typeof(FileNode).ToString()); if (File.Exists(clipboardObject.FileName)) { CopyFileHere(clipboardObject.FileName, clipboardObject.PerformMove); if (clipboardObject.PerformMove) { Clipboard.Clear(); } } } else if (dataObject.GetDataPresent(typeof(DirectoryNode))) { FileOperationClipboardObject clipboardObject = (FileOperationClipboardObject)dataObject.GetData(typeof(DirectoryNode).ToString()); if (System.IO.Directory.Exists(clipboardObject.FileName)) { CopyDirectoryHere(clipboardObject.FileName, clipboardObject.PerformMove); if (clipboardObject.PerformMove) { Clipboard.Clear(); } } } ProjectService.SaveSolution(); }
public override void Cut() { DoPerformCut = true; ClipboardWrapper.SetDataObject(FileOperationClipboardObject.CreateDataObject(this, true)); }
public override void Copy() { ClipboardWrapper.SetDataObject(FileOperationClipboardObject.CreateDataObject(this, false)); }
public override void Copy() { DoPerformCut = true; SD.Clipboard.SetDataObject(FileOperationClipboardObject.CreateDataObject(this, false)); }