示例#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;
 }