Пример #1
0
        private void mouseDown(object sender, MouseEventArgs e)
        {
            if (!SelectionOptions.Enabled)
            {
                return;
            }

            if (e.Button != MouseButtons.Left)
            {
                return;
            }

            var hitInfo = CalcHitInfo(e.Location);

            if (_hitInfo.IsSomeButton)
            {
                return;
            }

            var cancelArgs = new CancelEventArgs();

            SelectionStarted?.Invoke(this, hitInfo, cancelArgs);

            if (cancelArgs.Cancel)
            {
                return;
            }

            _selection.StartAt(e.Location);
            hideButtons();
        }
Пример #2
0
 public void OnPointerDown(PointerEventData eventData)
 {
     if (!_hasSelection)
     {
         _hasSelection = true;
         SelectionStarted?.Invoke();
         OnPointerEnter(eventData);
     }
 }
        public void StartSelection(IVideoContent firstSelectedItem = null)
        {
            if (!IsSelectionEnabled)
            {
                IsSelectionEnabled = true;

                if (firstSelectedItem != null)
                {
                    SelectionItems.Add(firstSelectedItem);
                    SelectionStarted?.Invoke(this, new RequestSelectionStartEventArgs()
                    {
                        FirstSelectedItem = firstSelectedItem
                    });
                }
            }
        }
Пример #4
0
 protected void OnSelectionStarted()
 {
     SelectionStarted?.Invoke(this, new EventArgs());
 }
Пример #5
0
 protected void OnSelectionStarted()
 {
     SelectionStarted?.Invoke(this, EventArgs.Empty);
 }