internal void Local_DragDropSuccess(object sender, EventArgs _) { if (!server.IsConnected) { return; } server?.NotifyDragDropSuccess(true); }
private void BeginReceivedOperation(NetworkSocket.DragDropDataReceivedArgs args) { if (!DragDropEnabled) { server.NotifyDragDropSuccess(false); return; } //Check if the received operation has previously been received if (CurrentOperation?.OperationGuid == args.OperationId) { ddManager.DoDragDrop(CurrentOperation.Data); return; } ClipboardDataBase cbData = ClipboardDataBase.FromBytes(args.RawData); cbData.OperationId = args.OperationId; //We need to setup the virtual files if this is a file drop if (cbData is ClipboardVirtualFileData cbFiles) { cbFiles.RequestPartMethod = server.RequestReadStreamAsync; cbFiles.RequestTokenMethod = server.RequestFileTokenAsync; ISLogger.Write("Copied files"); foreach (var file in cbFiles.AllFiles) { ISLogger.Write(file.FullPath); } } CurrentOperation = new ClientDataOperation(cbData, args.OperationId); ddManager.DoDragDrop(cbData); }