Пример #1
0
 public DropRequestArgs(DragDropInternal data, int X, int Y, int keyState)
 {
     m_data     = data;
     m_x        = X;
     m_y        = Y;
     m_keyState = keyState;
 }
Пример #2
0
 public DropEffectsArgs(DragDropInternal data, DragDropEffects effects, int X, int Y, int keyState)
 {
     m_effects  = effects;
     m_x        = X;
     m_y        = Y;
     m_keyState = keyState;
     m_data     = data;
 }
Пример #3
0
        private void DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
        {
            if (OnDataDrop != null)
            {
                DragDropInternal data = new DragDropInternal();

                if (e.Data.GetDataPresent(data.GetType()))
                {
                    System.Drawing.Point point = new System.Drawing.Point(e.X, e.Y);
                    point = ((Control)sender).PointToClient(point);

                    OnDataDrop(sender, new DropRequestArgs(( DragDropInternal )e.Data.GetData(data.GetType()),
                                                           point.X, point.Y, e.KeyState));
                }
            }
        }
Пример #4
0
        private void DragOver(object sender, System.Windows.Forms.DragEventArgs e)
        {
            System.Drawing.Point point = new System.Drawing.Point(e.X, e.Y);
            point = (( Control )sender).PointToClient(point);

            DragDropInternal data = new DragDropInternal();

            DropEffectsArgs arg = new DropEffectsArgs(( DragDropInternal )e.Data.GetData(data.GetType()),
                                                      DragDropEffects.Copy, point.X, point.Y, e.KeyState);

            if (OnEffectsRequest != null)
            {
                OnEffectsRequest(sender, arg);
            }

            e.Effect = arg.Effects;
        }
Пример #5
0
        private void BeginDragging(object sender)
        {
            dragging = true;
            DragDropInternal data = new DragDropInternal();

            if (OnDataRequest != null)
            {
                System.Drawing.Point point = new System.Drawing.Point(mouseX, mouseY);
                //point = ((Control)sender).PointToClient(point);
                OnDataRequest(sender, new DataRequestArgs(data, point.X, point.Y));
            }

            if (!data.isEmpty())
            {
                m_parent.DoDragDrop(data,
                                    DragDropEffects.All | DragDropEffects.Link | DragDropEffects.Copy | DragDropEffects.Scroll);
            }
        }
Пример #6
0
 private void DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
 {
   if ( OnDataDrop != null )
   {
     DragDropInternal data = new DragDropInternal();
     
     if ( e.Data.GetDataPresent(data.GetType()) ) 
     {
       System.Drawing.Point point = new System.Drawing.Point ( e.X, e.Y );
       point = ((Control)sender).PointToClient(point);
       
       OnDataDrop( sender, new DropRequestArgs( ( DragDropInternal )e.Data.GetData( data.GetType() ), 
         point.X, point.Y, e.KeyState ) );
     }
   }
 }
Пример #7
0
 private void DragOver( object sender, System.Windows.Forms.DragEventArgs e )
 {                        
   System.Drawing.Point point = new System.Drawing.Point ( e.X, e.Y );
   point = ( ( Control )sender ).PointToClient( point );
     
   DragDropInternal data = new DragDropInternal();
     
   DropEffectsArgs arg = new DropEffectsArgs( ( DragDropInternal )e.Data.GetData( data.GetType() ), 
     DragDropEffects.Copy, point.X, point.Y, e.KeyState );
     
   if ( OnEffectsRequest != null )
   {
     OnEffectsRequest( sender, arg );
   }
     
   e.Effect = arg.Effects;
 }
Пример #8
0
 private void BeginDragging ( object sender )
 {
   dragging = true;
   DragDropInternal data = new DragDropInternal();
   
   if( OnDataRequest != null ) 
   {
     System.Drawing.Point point = new System.Drawing.Point ( mouseX, mouseY );
     //point = ((Control)sender).PointToClient(point);
     OnDataRequest( sender, new DataRequestArgs ( data, point.X, point.Y ) );
   }
   
   if( !data.isEmpty() )
   {
     m_parent.DoDragDrop( data, 
       DragDropEffects.All | DragDropEffects.Link | DragDropEffects.Copy | DragDropEffects.Scroll);
   }
 }
Пример #9
0
 public DropRequestArgs( DragDropInternal data, int X, int Y, int keyState )
 {
   m_data = data;
   m_x = X;
   m_y = Y;
   m_keyState = keyState;
 }
Пример #10
0
 public DropEffectsArgs( DragDropInternal data, DragDropEffects effects, int X, int Y, int keyState )
 {
   m_effects = effects;
   m_x = X;
   m_y = Y;
   m_keyState = keyState;
   m_data = data;
 }
Пример #11
0
 public DataRequestArgs( DragDropInternal data, int X, int Y )
 {
   m_data = data;
   m_x = X;
   m_y = Y;
 }
Пример #12
0
 public DataRequestArgs(DragDropInternal data, int X, int Y)
 {
     m_data = data;
     m_x    = X;
     m_y    = Y;
 }