Ejemplo n.º 1
0
        public void OnDragOver(DragEventArgs e)
        {
            Debug.WriteLineIf(ToolStrip.s_itemReorderDebug.TraceVerbose, "OnDragOver: " + e.ToString());

            if (e.Data.GetDataPresent(typeof(ToolStripItem)))
            {
                if (ShowItemDropPoint(_owner.PointToClient(new Point(e.X, e.Y))))
                {
                    e.Effect = DragDropEffects.Move;
                }
                else
                {
                    if (_owner != null)
                    {
                        _owner.ClearInsertionMark();
                    }
                    e.Effect = DragDropEffects.None;
                }
            }
        }
Ejemplo n.º 2
0
 public void OnDragEnter(DragEventArgs e)
 {
     Debug.WriteLineIf(ToolStrip.s_itemReorderDebug.TraceVerbose, "OnDragEnter: " + e.ToString());
     if (e.Data.GetDataPresent(typeof(ToolStripItem)))
     {
         e.Effect = DragDropEffects.Move;
         ShowItemDropPoint(_owner.PointToClient(new Point(e.X, e.Y)));
     }
 }
Ejemplo n.º 3
0
        public void OnDragDrop(DragEventArgs e)
        {
            Debug.WriteLineIf(ToolStrip.s_itemReorderDebug.TraceVerbose, "OnDragDrop: " + e.ToString());

            if (e.Data.GetDataPresent(typeof(ToolStripItem)))
            {
                ToolStripItem item = (ToolStripItem)e.Data.GetData(typeof(ToolStripItem));
                OnDropItem(item, _owner.PointToClient(new Point(e.X, e.Y)));
            }
        }
Ejemplo n.º 4
0
 void attachment_list_DragDrop(object sender, DragEventArgs e)
 {
     MessageBox.Show(e.ToString());
 }