Beispiel #1
0
 void ThreekArray_Drop(object sender, DragEventArgs args)
 {
     try{
         UserControl parent = GetEventSourceElement(args);
         ThreekArray.SetIsDraggedOver(btnLeft, false);
         ThreekArray.SetIsDraggedOver(btnMiddle, false);
         ThreekArray.SetIsDraggedOver(btnRight, false);
         if (parent == btnLeft)
         {
             if (EventDragDropLeft != null)
             {
                 EventDragDropLeft(this, args);
             }
         }
         else if (parent == btnMiddle)
         {
             if (EventDragDropMiddle != null)
             {
                 EventDragDropMiddle(this, args);
             }
         }
         else if (parent == btnRight)
         {
             if (EventDragDropRight != null)
             {
                 EventDragDropRight(this, args);
             }
         }
     }
     catch (Exception ex)
     {
         UserLog.WriteLine("Exception caught in ThreeKArray.DragDrop: " + ex);
     }
 }
Beispiel #2
0
        void ThreekArray_DragOver(object sender, DragEventArgs args)
        {
            try{
                UserControl parent = GetEventSourceElement(args);
                ThreekArray.SetIsDraggedOver(btnLeft, false);
                ThreekArray.SetIsDraggedOver(btnMiddle, false);
                ThreekArray.SetIsDraggedOver(btnRight, false);

                ThreekArray.SetIsDraggedOver(parent, true);
                if (parent == btnLeft && PlaylistLeftEnabled)
                {
                    if (EventDragOverLeft != null)
                    {
                        EventDragOverLeft(this, args);
                        args.Handled = true;
                    }
                }
                else if (parent == btnMiddle && PlaylistMiddleEnabled)
                {
                    if (EventDragOverMiddle != null)
                    {
                        EventDragOverMiddle(this, args);
                        args.Handled = true;
                    }
                }
                else if (parent == btnRight && PlaylistRightEnabled)
                {
                    if (EventDragOverRight != null)
                    {
                        EventDragOverRight(this, args);
                        args.Handled = true;
                    }
                }
            }
            catch (Exception ex)
            {
                UserLog.WriteLine("Exception caught in ThreeKArray.DragOver: " + ex);
            }
        }