public void StopOperation(bool commit)
            {
                if (!_done)
                {
                    System.Windows.Input.Mouse.OverrideCursor = null;
                    _done = true;
                    _ui.ReleaseMouseCapture();
                    _ui.MouseUp   -= HandleMouseUp;
                    _ui.MouseMove -= HandleMouseMove;

                    _ui.ReleaseMouseCapture();
                    _ui._adorner.SetActive(false);
                    _ui.RegisterHandler(null);


                    if (commit)
                    {
                        _resizeTransform = ComputeModelResizeTransform();
                        if (_resizeTransform != null)
                        {
                            _ui.Model.Move(_resizeTransform);
                            _ui._adorner.UpdateGeometry();
                            _ui._parent.EditMode = EditMode.Select;
                        }
                    }
                    else
                    {
                        _ui.DropSnapshot();
                    }
                }
            }
示例#2
0
 public void StopOperation(bool commit)
 {
     if (!_done)
     {
         _done = true;
         _ui.ReleaseMouseCapture();
         _ui.MouseUp   -= HandleMouseUp;
         _ui.MouseMove -= HandleMouseMove;
         _ui.ReleaseMouseCapture();
         _ui._adorner.SetActive(false);
         _ui.RegisterHandler(null);
         if (commit && _moveTransform != null)
         {
             _ui.Model.Move(_moveTransform);
             _ui._adorner.UpdateGeometry();
         }
         else
         {
             _ui.DropSnapshot();
         }
     }
 }