Example #1
0
        private void ResizeControl_Inflate(object sender, ResizeEventArgs e)
        {
            if (parentLocation.IsEmpty)
            {
                parentLocation = base.Parent.Location;
            }
            Size size3 = MaximumSize = (MinimumSize = new Size(Math.Max(m_minimumSize.Width, base.Size.Width + e.DeltaX), Math.Max(m_minimumSize.Height, base.Size.Height + e.DeltaY)));

            if (RightToLeft == RightToLeft.Yes)
            {
                base.Parent.Location = new Point(parentLocation.X - (size3.Width - m_minimumSize.Width), parentLocation.Y);
            }
            m_resizeControl.Refresh();
        }
Example #2
0
 protected override void OnMouseMove(MouseEventArgs e)
 {
     base.OnMouseMove(e);
     if (m_resize && this.Inflate != null)
     {
         Point mousePosition = Control.MousePosition;
         int   num           = mousePosition.X - m_mouseLocation.X;
         if (RightToLeft == RightToLeft.Yes)
         {
             num *= -1;
         }
         ResizeEventArgs resizeEventArgs = new ResizeEventArgs(num, mousePosition.Y - m_mouseLocation.Y);
         if (Math.Abs(resizeEventArgs.DeltaX) > 1 || Math.Abs(resizeEventArgs.DeltaY) > 1)
         {
             this.Inflate(this, resizeEventArgs);
             m_mouseLocation = mousePosition;
         }
     }
     SetResizeCursor(e);
 }