Exemple #1
0
        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());
            }
        }
Exemple #2
0
 private void openPanel_DragDrop(object sender, DragEventArgs e)
 {
     connection.SendOpenSegment(DraggingSegment.Serialize());
 }