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