Exemple #1
0
        void Feeder_MouseUp(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left)
            {
                return;
            }

            _isDragging  = false;
            this.Capture = false;

            if (this.MvProject.IsPanelInsertMode)
            {
                if (_sourceControl is GroupBox)
                {
                    ShiftPanels();
                }
                else if (_sourceControl is Panel)
                {
                    if (PanelArranged.Contains(this))
                    {
                        _targetControl = GetTargetControl(this.Location);
                        FlyToTheTarget(_targetControl, _sourceControl);
                        PlaceFeeder(this, _targetControl);
                    }
                }
            }
            else
            {
                if (PanelArranged.Contains(this))
                {
                    _targetControl = GetTargetControl(this.Location);
                    FlyToTheTarget(_targetControl, _sourceControl);
                    PlaceFeeder(this, _targetControl);
                }
            }

            return;
        }