예제 #1
0
파일: C1DragArgs.cs 프로젝트: Daoting/dt
 // Methods
 internal C1DragDeltaEventArgs(C1DragHelper helper, RoutedEventArgs originalArgs, C1PointerDeviceType pointerType, Point deltaTranslation, Point cumulativeTranslation, bool isInertial)
     : base(helper, originalArgs, pointerType)
 {
     DeltaTranslation      = deltaTranslation;
     CumulativeTranslation = cumulativeTranslation;
     IsInertial            = isInertial;
 }
예제 #2
0
파일: C1DragArgs.cs 프로젝트: Daoting/dt
 // Methods
 internal C1DragStartingEventArgs(C1DragHelper helper, RoutedEventArgs originalArgs, C1PointerDeviceType pointerType, C1DragHelperMode mode, bool captureElementOnPointerPressed, double initialThreshold)
     : base(helper, originalArgs, pointerType)
 {
     Mode = mode;
     CaptureElementOnPointerPressed = captureElementOnPointerPressed;
     InitialThreshold = initialThreshold;
 }
예제 #3
0
        void ClearDragHelper(ChartPanelObject obj)
        {
            C1DragHelper dragHelper = obj.DragHelper;

            if (dragHelper != null)
            {
                dragHelper.Complete();
                dragHelper.FinalizeDrag();
                dragHelper.DragStarted   -= new EventHandler <C1DragStartedEventArgs>(_dragHelper_DragStarted);
                dragHelper.DragDelta     -= new EventHandler <C1DragDeltaEventArgs>(_dragHelper_DragDelta);
                dragHelper.DragCompleted -= new EventHandler <C1DragCompletedEventArgs>(_dragHelper_DragCompleted);
                obj.DragHelper            = null;
            }
        }
예제 #4
0
        internal void AttachEvents(ChartPanelObject obj, ChartPanelAction action)
        {
            ClearDragHelper(obj);
            C1DragHelper helper = null;

            if (action == ChartPanelAction.LeftMouseButtonDrag)
            {
                helper = new C1DragHelper(obj, C1DragHelperMode.TranslateXY, 1.0, true, false, false, false);
            }
            else if (action == ChartPanelAction.RightMouseButtonDrag)
            {
                helper = new C1DragHelper(obj, C1DragHelperMode.TranslateXY, 1.0, true, false, false, true);
            }
            if (helper != null)
            {
                helper.DragStarted   += new EventHandler <C1DragStartedEventArgs>(_dragHelper_DragStarted);
                helper.DragDelta     += new EventHandler <C1DragDeltaEventArgs>(_dragHelper_DragDelta);
                helper.DragCompleted += new EventHandler <C1DragCompletedEventArgs>(_dragHelper_DragCompleted);
                obj.DragHelper        = helper;
            }
        }
예제 #5
0
파일: C1DragArgs.cs 프로젝트: Daoting/dt
 // Methods
 internal C1DragCompletedEventArgs(C1DragHelper helper, RoutedEventArgs originalArgs, C1PointerDeviceType pointerType, Point cumulativeTranslation)
     : base(helper, originalArgs, pointerType)
 {
     CumulativeTranslation = cumulativeTranslation;
 }
예제 #6
0
파일: C1DragArgs.cs 프로젝트: Daoting/dt
 // Methods
 internal C1DragEventArgs(C1DragHelper dragHelper, RoutedEventArgs originalArgs, C1PointerDeviceType pointerType)
     : base(originalArgs, pointerType)
 {
     DragHelper = dragHelper;
 }
예제 #7
0
파일: C1DragArgs.cs 프로젝트: Daoting/dt
 // Methods
 internal C1DragStartedEventArgs(C1DragHelper helper, RoutedEventArgs originalArgs, C1PointerDeviceType pointerType, Point origin, C1DragDirection direction)
     : base(helper, originalArgs, pointerType)
 {
     Origin    = origin;
     Direction = direction;
 }
예제 #8
0
파일: C1DragArgs.cs 프로젝트: Daoting/dt
 // Methods
 internal C1DragInertiaStartedEventArgs(C1DragHelper helper, RoutedEventArgs originalArgs, C1PointerDeviceType pointerType, Point finalVelocity, double desiredDeceleration)
     : base(helper, originalArgs, pointerType)
 {
     Velocity            = finalVelocity;
     DesiredDeceleration = desiredDeceleration;
 }