예제 #1
0
        public override void KeyDown(NSEvent theEvent)
        {
            if (SelectedRow > -1 && SelectorKeys.Contains(theEvent.KeyCode))
            {
                RepositoryActionRequested?.Invoke(this, SelectedRow);
                return; // do not call base to avoid the system beeping
            }

            base.KeyDown(theEvent);
        }
예제 #2
0
        public override void MouseDown(NSEvent theEvent)
        {
            base.MouseDown(theEvent);

            var locationInView = this.ConvertPointToView(theEvent.LocationInWindow, null);
            var row            = GetRow(locationInView);

            if (row > -1)
            {
                RepositoryActionRequested?.Invoke(this, row);
            }
        }
예제 #3
0
        public override void MouseDown(NSEvent theEvent)
        {
            base.MouseDown(theEvent);

            var isDoubleClick = theEvent.ClickCount > 1;

            if (isDoubleClick)
            {
                var row = GetRowByMouseEventArgs(theEvent);
                if (row > -1)
                {
                    RepositoryActionRequested?.Invoke(this, row);
                }
            }
        }