protected virtual void OnDragDropEx(SuperlistDragEventArgs ea) { if (DragDropEx != null) { DragDropEx(this, ea); } }
protected override void OnDragOver(DragEventArgs e) { base.OnDragOver(e); Point pt = PointToClient(new Point(e.X, e.Y)); Section s; SuperlistDragEventArgs ea = new SuperlistDragEventArgs(SectionFromPoint(pt), e); OnDragOverEx(ea); if (ea.SectionAllowedToDropOn == null) { s = GetDroppableSection(pt, e.Data); } else { s = ea.SectionAllowedToDropOn; } if (_currentDropSection != null && s != _currentDropSection) { _currentDropSection.DragLeave(); if (s != null) { for (Section parent = s.Parent; parent != null; parent = parent.Parent) { parent.DescendentDraggedOver(s); } } } _currentDropSection = s; if (s != null) { if (e.Effect == DragDropEffects.None) { e.Effect = e.AllowedEffect; } s.DraggingOver(pt, e.Data); } else { e.Effect = DragDropEffects.None; } }
protected virtual void OnDragOverEx( SuperlistDragEventArgs ea ) { if( DragOverEx != null ) { DragOverEx( this, ea ); } }
protected override void OnDragOver( DragEventArgs e ) { base.OnDragOver( e ); Point pt = PointToClient( new Point( e.X, e.Y ) ); Section s; SuperlistDragEventArgs ea = new SuperlistDragEventArgs( SectionFromPoint( pt ), e ); OnDragOverEx( ea ); if( ea.SectionAllowedToDropOn == null ) { s = GetDroppableSection( pt, e.Data ); } else { s = ea.SectionAllowedToDropOn; } if( _currentDropSection != null && s != _currentDropSection ) { _currentDropSection.DragLeave(); if( s != null ) { for( Section parent = s.Parent; parent != null; parent = parent.Parent ) { parent.DescendentDraggedOver( s ); } } } _currentDropSection = s; if( s != null ) { if( e.Effect == DragDropEffects.None ) { e.Effect = e.AllowedEffect; } s.DraggingOver( pt, e.Data ); } else { e.Effect = DragDropEffects.None; } }