private void Paste() { if (this.ClipBoard == null) { return; } ObjectListView listView = this.GetCurrentListView(); MyFileSystemInfo target = null; if (this.IsNavigator(listView)) { target = listView.SelectedObject as MyFileSystemInfo; } else { target = listView.Tag as MyFileSystemInfo; } if (target == null || !target.IsDirectory) { return; } this.MoveFiles(this.ClipBoard.SourceListView, listView, this.ClipBoard.SelectedItems, target, this.ClipBoard.Mode); this.RefreshListView(this.ClipBoard.SourceListView); this.RefreshListView(listView); this.ClipBoard = null; }
private void ClipboardChange(object sender, FileClipBoard clipBoard) { UC_Explorer uc = sender as UC_Explorer; if (uc.Name == this.ucSource.Name) { this.ucTarget.ClipBoard = clipBoard; } else { this.ucSource.ClipBoard = clipBoard; } }
private void SetClipboard(FileMoveMode mode) { ObjectListView listView = this.GetCurrentListView(); this.ClipBoard = new FileClipBoard() { Mode = mode, SourceListView = listView, SelectedItems = listView.SelectedObjects.OfType <MyFileSystemInfo>() }; if (this.ClipboardChange != null) { this.ClipboardChange(this, this.ClipBoard); } }