Example #1
0
        private dragOption selectLocation(System.Drawing.Point mouseLocation)
        {
            dragOption ret = dragOption.none;
            Location   loc = GetLocation(mouseLocation);

            if (loc != null)
            {
                if (Control.ModifierKeys != Keys.Shift && _dragging == dragOption.none)
                {
                    _currentLocations.Clear();
                }

                if (_currentLocations.Contains(loc))
                {
                    if (_dragging != dragOption.dragAdd)
                    {
                        _currentLocations.Remove(loc);
                        ret = dragOption.dragRemove;
                    }
                }
                else
                {
                    if (_dragging != dragOption.dragRemove)
                    {
                        _currentLocations.Add(loc);
                        ret = dragOption.dragAdd;
                    }
                }
            }
            return(ret);
        }
Example #2
0
 private void skControl1_MouseUp(object sender, MouseEventArgs e)
 {
     _dragging = dragOption.none;
 }
Example #3
0
 private void skControl1_MouseDown(object sender, MouseEventArgs e)
 {
     _dragging = selectLocation(e.Location);
     skControl1.Invalidate();
 }