Beispiel #1
0
 public override void MouseUp(object sender, MouseButtonEventArgs e)
 {
     _selectionStart = _selectionEnd = null;
     Apply();
     UpdateSelectionPreview();
 }
Beispiel #2
0
        public override void MouseDown(object sender, MouseButtonEventArgs e)
        {
            SegmentSide segmentSide = ProcessEventArg(sender, e);
            if (segmentSide == null) return;

            _selectionStart = _selectionEnd = segmentSide;
            UpdateSelectionPreview();
        }
Beispiel #3
0
        public override void MouseMove(object sender, MouseEventArgs e)
        {
            SegmentSide segmentSide = ProcessEventArg(sender, e);
            if (segmentSide == null) return;

            if (_selectionStart != null && e.LeftButton == MouseButtonState.Pressed)
            {
                _selectionEnd = segmentSide;
                UpdateSelectionPreview();
            }
            else
            {
                _selectionStart = _selectionEnd = segmentSide;
                UpdateSelectionPreview();
            }
        }
Beispiel #4
0
 public override void ClearPreview()
 {
     if (_selectionStart != null)
     {
         _selectionStart = _selectionEnd = null;
         UpdateSelectionPreview();
     }
 }