コード例 #1
0
        protected override void OnDragOver(DragEventArgs e)
        {
            base.OnDragOver(e);
            e.Effects = e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.Copy : DragDropEffects.None;
            e.Handled = true;

#if !USE_STANDARD_DRAGDROP
            DropTargetHelper.DragOver(e.GetPosition(this), e.Effects);
#endif
        }
コード例 #2
0
        protected override void OnDragOver(DragEventArgs e)
        {
            base.OnDragOver(e);

            e.Effects = (e.Data.GetDataPresent(DataFormats.FileDrop) && !(ServiceProvider.ViewManager.Dialog is EmbeddedBrowserControl))
                ? DragDropEffects.Copy
                : DragDropEffects.None;

            e.Handled = true;

#if !USE_STANDARD_DRAGDROP
            DropTargetHelper.DragOver(e.GetPosition(this), e.Effects);
#endif
        }
コード例 #3
0
        private void tvwFiles_DragOver(object sender, DragEventArgs e)
        {
            TreeNode nodeAt   = tvwFiles.GetNodeAt(tvwFiles.PointToClient(new Point(e.X, e.Y)));
            bool     fileDrop = (e.Data.GetDataPresent(DataFormats.FileDrop));

            if (nodeAt != null || fileDrop)
            {
                if (nodeAt != null)
                {
                    if (nodeAt != previousDragOver)
                    {
                        if (nodeAt.Tag is FileType)
                        {
                            tvwFiles.SetInsertionMark(nodeAt.Parent, explorerTreeView.InsertType.InsideNode);
                            e.Data.SetDropDescription(DropImageType.Copy, "Zu %1 hinzufügen", nodeAt.Parent.Text);
                        }
                        else
                        {
                            tvwFiles.SetInsertionMark(nodeAt, explorerTreeView.InsertType.InsideNode);
                            e.Data.SetDropDescription(DropImageType.Copy, "Zu %1 hinzufügen", nodeAt.Text);
                        }
                    }
                }
                previousDragOver = nodeAt;
                e.Effect         = e.AllowedEffect & DragDropEffects.Copy;
            }
            else
            {
                e.Effect = DragDropEffects.None;
                tvwFiles.SetInsertionMark(null, explorerTreeView.InsertType.BeforeNode);
                e.Data.DisableDropDescription();
                e.Effect = DragDropEffects.None;
                DropTargetHelper.DragOver(new Point(e.X, e.Y), e.Effect);
                previousDragOver = null;
            }
            DropTargetHelper.DragOver(new Point(e.X, e.Y), e.Effect);
        }
コード例 #4
0
ファイル: SchedulerPanel.cs プロジェクト: gtrant/eraser
 private void scheduler_DragOver(object sender, DragEventArgs e)
 {
     DropTargetHelper.DragOver(new Point(e.X, e.Y), e.Effect);
 }
コード例 #5
0
 /// <inheritdoc />
 /// <summary>Raises the <see cref="E:System.Windows.Forms.Control.DragOver" /> event.</summary>
 /// <param name="eventArgs">A <see cref="T:System.Windows.Forms.DragEventArgs" /> that contains the event data. </param>
 protected override void OnDragOver(DragEventArgs eventArgs)
 {
     eventArgs.Effect = DragDropEffects.None;
     DropTargetHelper.DragOver(new Point(eventArgs.X, eventArgs.Y), eventArgs.Effect);
     base.OnDragOver(eventArgs);
 }
コード例 #6
0
 /// <summary>
 ///   Triggered when a handler item is being dragged over the handler list region
 /// </summary>
 /// <param name="sender">Sender object</param>
 /// <param name="eventArgs">Event arguments</param>
 private void OnHandlerDragOver(object sender, DragEventArgs eventArgs)
 {
     DropTargetHelper.DragOver(new Point(eventArgs.X, eventArgs.Y),
                               eventArgs.AllowedEffect & DragDropEffects.Copy);
 }
コード例 #7
0
 /// <summary>
 ///   Triggered when an item is being dragged over the handler list
 /// </summary>
 /// <param name="sender">Sender object</param>
 /// <param name="eventArgs">Event arguments</param>
 private void OnHandlerListDragOver(object sender, DragEventArgs eventArgs)
 {
     eventArgs.Effect = DragDropEffects.None;
     DropTargetHelper.DragOver(new Point(eventArgs.X, eventArgs.Y), eventArgs.Effect);
 }
コード例 #8
0
 protected override void OnDragOver(DragEventArgs drgevent)
 {
     DropTargetHelper.DragOver(new Point(drgevent.X, drgevent.Y), DragDropEffects.None);
     base.OnDragOver(drgevent);
 }
コード例 #9
0
 protected override void OnDragOver(DragEventArgs e)
 {
     e.Effects = DragDropEffects.Copy;
     DropTargetHelper.DragOver(e.GetPosition(this), e.Effects);
     e.Handled = true;
 }
コード例 #10
0
 protected override void OnDragOver(DragEventArgs drgevent)
 {
     DropTargetHelper.DragOver(GetPoint(drgevent), drgevent.Effect);
     base.OnDragOver(drgevent);
 }