Beispiel #1
0
        public override void ReportHandleManipulation(DDHandle source, Point delta)
        {
            base.ReportHandleManipulation(source, delta);

            if (source is DDPanelHandle)
            {
                DDPanelHandle handle    = source as DDPanelHandle;
                Rect          newBounds = Bounds;
                if ((handle.Position & DDPanelHandlePosition.Left) == DDPanelHandlePosition.Left)
                {
                    newBounds.X    += delta.X;
                    newBounds.Width = Math.Max(newBounds.Width - delta.X, 0);
                }
                if ((handle.Position & DDPanelHandlePosition.Top) == DDPanelHandlePosition.Top)
                {
                    newBounds.Y     += delta.Y;
                    newBounds.Height = Math.Max(newBounds.Height - delta.Y, 0);
                }
                if ((handle.Position & DDPanelHandlePosition.Right) == DDPanelHandlePosition.Right)
                {
                    newBounds.Width = Math.Max(newBounds.Width + delta.X, 0);
                }
                if ((handle.Position & DDPanelHandlePosition.Bottom) == DDPanelHandlePosition.Bottom)
                {
                    newBounds.Height = Math.Max(newBounds.Height + delta.Y, 0);
                }
                Bounds = newBounds;
            }
        }
Beispiel #2
0
        public void ReportHandleManipulation(DDHandle handle, Point newPosition)
        {
//			StartChange("Manipulation");
            if (handle is DDPointHandle)
            {
                if ((Point != null) && (Control1 != null))
                {
                    Vector delta = Point.Point - Control1.Point;
                    Control1 = newPosition - delta;
                }
                if ((Point != null) && (Control2 != null))
                {
                    Vector delta = Point.Point - Control2.Point;
                    Control2 = newPosition - delta;
                }
                Point = newPosition;
            }
            else if (handle is DDControl1Handle)
            {
                Control1            = newPosition;
                Control1ManuallySet = true;
            }
            else if (handle is DDControl2Handle)
            {
                Control2            = newPosition;
                Control2ManuallySet = true;
            }
//			EndChange();
        }
Beispiel #3
0
 public virtual void ReportHandleManipulation(DDHandle source, Point delta)
 {
 }