private void QuickLinkTargetImage_Drop(object sender, DragEventArgs e) { QuickLinkTargetImage quickLinkTargetImage = (QuickLinkTargetImage)sender; QuickLinkDrag quickLinkDrag = VmcStudioUtil.DragDropObject as QuickLinkDrag; if (quickLinkDrag != null) { int num; if (quickLinkTargetImage.Link != null) { num = this.Strip.QuickLinks.IndexOf(quickLinkTargetImage.Link); } else { num = this.Strip.QuickLinks.Count; } if (this.Strip.QuickLinks.Contains(quickLinkDrag.Link)) { int num2 = this.Strip.QuickLinks.IndexOf(quickLinkDrag.Link); this.Strip.QuickLinks.Move(num2, (num2 < num) ? (num - 1) : num); this.m_removeDragLink = false; } else { this.Strip.QuickLinks.Insert(num, quickLinkDrag.Link); } e.Effects = DragDropEffects.Move; e.Handled = true; } }
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; }
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; } } }