Ejemplo n.º 1
0
 internal static void OnDragEnded(EnhancedDragEventArgs e)
 {
     if (Advent.Common.UI.DragDrop.enhancedDragEnded == null)
     {
         return;
     }
     Advent.Common.UI.DragDrop.enhancedDragEnded((object)null, e);
 }
Ejemplo n.º 2
0
 public static DragDropEffects DoDragDrop(this System.Windows.IDataObject dataObject, UIElement dragSource, BitmapSource dragImage, System.Windows.Point cursorOffset, DragDropEffects allowedEffects)
 {
     DataObjectExtensions.RegisterDefaultDragSource(dragSource, dataObject, cursorOffset, dragImage);
     EnhancedDragEventArgs e = new EnhancedDragEventArgs()
     {
         DataObject = dataObject,
         Effects = allowedEffects
     };
     try
     {
         Advent.Common.UI.DragDrop.OnDragStarted(e);
         e.Effects = System.Windows.DragDrop.DoDragDrop((DependencyObject)dragSource, (object)dataObject, allowedEffects);
         return e.Effects;
     }
     finally
     {
         DataObjectExtensions.DragLeave();
         DataObjectExtensions.UnregisterDefaultDragSource(dragSource);
         Advent.Common.UI.DragDrop.OnDragEnded(e);
     }
 }
Ejemplo n.º 3
0
 private void dragHelper_DragEnded(object sender, EnhancedDragEventArgs e)
 {
     this.DropTargetVisibility = Visibility.Hidden;
     if (e.Effects != DragDropEffects.None)
     {
         QuickLinkDrag quickLinkDrag = VmcStudioUtil.DragDropObject as QuickLinkDrag;
         if (this.m_removeDragLink && quickLinkDrag != null)
         {
             this.Strip.QuickLinks.Remove(quickLinkDrag.Link);
         }
     }
     this.m_removeDragLink = false;
 }
Ejemplo n.º 4
0
 private void dragHelper_DragStarted(object sender, EnhancedDragEventArgs e)
 {
     QuickLinkDrag quickLinkDrag = VmcStudioUtil.DragDropObject as QuickLinkDrag;
     if (quickLinkDrag != null)
     {
         this.m_removeDragLink = this.Strip.QuickLinks.Contains(quickLinkDrag.Link);
         if (this.Strip.CanAddQuickLink(quickLinkDrag.Link))
         {
             this.DropTargetVisibility = Visibility.Visible;
         }
     }
 }