BExplorer.Shell.ShellTreeViewEx.PasteAvailableFiles C# (CSharp) Метод

PasteAvailableFiles() приватный Метод

Pasted the files in the clipboard to the ShellTreeView's currentlt Selected Node on a separate thread
private PasteAvailableFiles ( ) : void
Результат void
		private void PasteAvailableFiles() {
			var selectedItem = this.ShellTreeView.SelectedNode.Tag as IListItemEx;
			if (selectedItem == null) return;
			var handle = this.Handle;
			var thread = new Thread(() => {
				var dataObject = F.Clipboard.GetDataObject();
				IShellItemArray items = null;
				if (dataObject.GetDataPresent("FileDrop")) {
					//TODO: Fix FileDorp option
					//items = ((F.DataObject)dataObject).GetFileDropList().OfType<String>().Select(s => FileSystemListItem.ToFileSystemItem(IntPtr.Zero, s.ToShellParsingName()).ComInterface).ToArray();
				}
				else {
					items = dataObject.ToShellItemArray();
				}

				try {
					var fo = new IIFileOperation(handle);
					if (dataObject.ToDropEffect() == System.Windows.DragDropEffects.Copy)
						fo.CopyItems(items, selectedItem);
					else
						fo.MoveItems(items, selectedItem);

					fo.PerformOperations();
				}
				catch (SecurityException) {
					throw;
				}
			});

			thread.SetApartmentState(ApartmentState.STA);
			thread.Start();
		}