private void openPanelPictureBox_MouseDown(object sender, MouseEventArgs e) { PictureBox pictureBox = (PictureBox)sender; var img = pictureBox.Image; if (img == null || isReady) { return; } TableLayoutPanelCellPosition pos = openPanel.GetCellPosition(pictureBox); DraggingSegment = openedSegments[pos.Row * 12 + pos.Column]; connection.RemoveOpenSegment(DraggingSegment.Serialize()); if (DoDragDrop(img, DragDropEffects.Move) != DragDropEffects.Move) { connection.SendOpenSegment(DraggingSegment.Serialize()); } }
private void openPanel_DragDrop(object sender, DragEventArgs e) { connection.SendOpenSegment(DraggingSegment.Serialize()); }