Example #1
0
        private void FinishedResizeMoveMarks(ElementMoveType type)
        {
            //TODO This selected mark move thing needs help
            _timeLineGlobalEventManager.OnAlignmentActivity(new AlignmentEventArgs(false, null));

            _timeLineGlobalEventManager.OnMarkMoved(new MarksMovedEventArgs(_marksMoveResizeInfo, type));

            _marksMoveResizeInfo     = null;
            _moveResizeStartLocation = Point.Empty;
        }
Example #2
0
        //public SortedDictionary<TimeSpan, SnapDetails> selectedMarks = new SortedDictionary<TimeSpan, SnapDetails>();

        protected override void OnMouseDown(MouseEventArgs e)
        {
            //Console.WriteLine("Clicks: " + e.Clicks);

            m_button     = e.Button;
            m_mouseDownX = e.X;
            //if (e.Button != MouseButtons.Left) return;

            // If we're hovering over a mark when left button is clicked, then select/move the mark
            var marksAtTime = MarksAt(pixelsToTime(e.X) + VisibleTimeStart);

            if (marksAtTime.Any())
            {
                if (ModifierKeys != Keys.Control)
                {
                    _marksSelectionManager.ClearSelected();
                }

                if (_marksSelectionManager.SelectedMarks.Contains(marksAtTime.First()))
                {
                    _marksSelectionManager.DeSelect(marksAtTime.First());
                }
                else
                {
                    _marksSelectionManager.Select(marksAtTime.First());
                }

                _mouseDownMark       = marksAtTime.First();
                _dragLastTime        = _mouseDownMark.StartTime;
                m_mouseState         = MouseState.DraggingMark;
                _marksMoveResizeInfo = new MarksMoveResizeInfo(_marksSelectionManager.SelectedMarks);
            }
            else if (Cursor == Cursors.HSplit)
            {
                m_mouseState = MouseState.ResizeRuler;
            }
            else
            {
                _marksSelectionManager.ClearSelected();
                m_mouseState = MouseState.DragWait;
            }
        }
Example #3
0
 ///<summary>Called when any operation that moves mark times (namely drag-move and hresize).
 ///Saves the pre-move information and begins update on all selected marks.</summary>
 private void BeginMoveResizeMarks(Point location)
 {
     _moveResizeStartLocation = location;
     _marksMoveResizeInfo     = new MarksMoveResizeInfo(_marksSelectionManager.SelectedMarks.ToArray());
 }