private void OnBeginDrag(object source, BehaviorDragDropEventArgs e) { ArrayList list = new ArrayList(e.DragComponents); ArrayList list2 = new ArrayList(); foreach (ControlBodyGlyph glyph in this.bodyAdorner.Glyphs) { if ((glyph.RelatedComponent is Control) && (list.Contains(glyph.RelatedComponent) || !((Control)glyph.RelatedComponent).AllowDrop)) { list2.Add(glyph); } } foreach (Glyph glyph2 in list2) { this.bodyAdorner.Glyphs.Remove(glyph2); } }
internal void OnBeginDrag(BehaviorDragDropEventArgs e) { this.OnBeginDrag(null, e); }
private void OnBeginDrag(object source, BehaviorDragDropEventArgs e) { ArrayList list = new ArrayList(e.DragComponents); ArrayList list2 = new ArrayList(); foreach (ControlBodyGlyph glyph in this.bodyAdorner.Glyphs) { if ((glyph.RelatedComponent is Control) && (list.Contains(glyph.RelatedComponent) || !((Control) glyph.RelatedComponent).AllowDrop)) { list2.Add(glyph); } } foreach (Glyph glyph2 in list2) { this.bodyAdorner.Glyphs.Remove(glyph2); } }
private void OnEndDrag(BehaviorDragDropEventArgs e) { if (this.endDragHandler != null) { this.endDragHandler(this, e); } }
internal DragDropEffects DoDragDrop(DropSourceBehavior dropSourceBehavior) { this.DropSource.QueryContinueDrag += new QueryContinueDragEventHandler(dropSourceBehavior.QueryContinueDrag); this.DropSource.GiveFeedback += new GiveFeedbackEventHandler(dropSourceBehavior.GiveFeedback); DragDropEffects none = DragDropEffects.None; BehaviorDragDropEventArgs e = new BehaviorDragDropEventArgs(((DropSourceBehavior.BehaviorDataObject) dropSourceBehavior.DataObject).DragComponents); try { try { this.OnBeginDrag(e); this.dragging = true; this.cancelDrag = false; this.dragEnterReplies.Clear(); none = this.DropSource.DoDragDrop(dropSourceBehavior.DataObject, dropSourceBehavior.AllowedEffects); } finally { this.DropSource.QueryContinueDrag -= new QueryContinueDragEventHandler(dropSourceBehavior.QueryContinueDrag); this.DropSource.GiveFeedback -= new GiveFeedbackEventHandler(dropSourceBehavior.GiveFeedback); this.EndDragNotification(); this.validDragArgs = null; this.dragging = false; this.cancelDrag = false; this.OnEndDrag(e); } return none; } catch (CheckoutException exception) { if (exception != CheckoutException.Canceled) { throw; } return DragDropEffects.None; } finally { if (dropSourceBehavior != null) { dropSourceBehavior.CleanupDrag(); } } return none; }