Пример #1
0
            public override ToolState EndPointerSequence(PointerEventInfo info, ILevelGeometry viewport)
            {
                ClearAnnot();

                Tool.UpdatePropertyProvider();

                ObjectMoveCommand command = new ObjectMoveCommand();
                command.QueueRotate(HitObject, InitialPosition, HitObject.Position, InitialAngle, HitObject.Rotation);

                Tool.History.Execute(command);

                return new RotationStandbyToolState(Tool) {
                    HitObject = HitObject,
                }.EndPointerSequence(info, viewport);
            }
        public void CommitMoveFromRecordedLocations()
        {
            ObjectMoveCommand command = new ObjectMoveCommand(this);

            foreach (SelectedObjectRecord record in _selectedObjects) {
                Point newLocation = new Point(record.Instance.X, record.Instance.Y);
                command.QueueMove(record.Instance, record.InitialLocation, newLocation);
                record.InitialLocation = newLocation;
            }

            ExecuteCommand(command);
        }