Beispiel #1
0
        override public void HandleDrop(DragEventArgs e, ContainerListDragButton otherButton, ContainerListDragButton thisButton)
        {
            PropertyFlowList ctrlMove   = otherButton.Tag as PropertyFlowList;
            PropertyFlowList ctrlTarget = thisButton.Tag as PropertyFlowList;

            if (e.Effect == DragDropEffects.Move)
            {
                //if (ctrlMove.SelectedObject == ctrlTarget.SelectedObject)
                if (ctrlMove.Parent == ctrlTarget.Parent)
                {
                    this.OnReOrderRequest(otherButton, thisButton);
                }
                else if (ctrlMove.SelectedObject.GetType() == ctrlTarget.SelectedObject.GetType())
                {
                    ContainerList senderParent = otherButton.GetParentList();
                    senderParent.OnTransferRequest(this, otherButton);
                    //return DragDropEffects.Move;
                }
            }
        }
Beispiel #2
0
 void SuperList_DragDrop(object sender, DragEventArgs e)
 {
     if (mControls.Count == 0)
     {
         if (e.Data.GetDataPresent(typeof(ContainerListDragButton)))
         {
             object data = e.Data.GetData(typeof(ContainerListDragButton));
             ContainerListDragButton otherButton = data as ContainerListDragButton;
             if (otherButton != null)
             {
                 ContainerList senderParent = otherButton.GetParentList();
                 if (e.Effect == DragDropEffects.Move)
                 {
                     senderParent.OnTransferRequest(this, otherButton);
                 }
                 else if (e.Effect == DragDropEffects.Copy)
                 {
                     senderParent.OnCopyRequest(this, otherButton);
                 }
             }
         }
     }
 }