BExplorer.Shell.ShellTreeViewEx.CutSelectedFiles C# (CSharp) Method

CutSelectedFiles() private method

Cuts the currently selected items (signals the UI and saves items into the clipboard)
private CutSelectedFiles ( ) : void
return void
		private void CutSelectedFiles() {
			var item = new TVITEMW() {
				mask = TVIF.TVIF_STATE,
				stateMask = TVIS.TVIS_CUT,
				state = TVIS.TVIS_CUT,
				hItem = this.ShellTreeView.SelectedNode.Handle,
			};

			User32.SendMessage(this.ShellTreeView.Handle, MSG.TVM_SETITEMW, 0, ref item);

			this.cuttedNode = this.ShellTreeView.SelectedNode;
			var selectedItems = new[] { this.ShellTreeView.SelectedNode.Tag as IListItemEx };
			var ddataObject = new F.DataObject();
			// Copy or Cut operation (5 = copy; 2 = cut)
			ddataObject.SetData("Preferred DropEffect", true, new MemoryStream(new byte[] { 2, 0, 0, 0 }));
			ddataObject.SetData("Shell IDList Array", true, selectedItems.CreateShellIDList());
			Clipboard.SetDataObject(ddataObject, true);
		}