protected override void OnKeyDown(KeyPressEventArgs e) { if (!this.isMouseMoved && !this.isMouseDown) { this.vector = base.GetVectorByKey(e.Event.Key); if (this.vector != null) { if (!Services.TaskService.IsRunningCompositeTask) { Services.TaskService.BeginCompositeTask("MouseDown"); } this.lastMousePoint = new PointF(0f, 0f); OperationType operationType = this.operationType; this.operationType = OperationType.OPERATION_POSITION; if (KeyboardExtend.IsModifyKeyDown(ModifierType.ShiftMask)) { this.vector.X *= 10f; this.vector.Y *= 10f; } this.vector.X *= this.canvasObject.Scale.ScaleX; this.vector.Y *= this.canvasObject.Scale.ScaleY; this.HandleMouseMove(this.vector); this.isMouseMoved = false; this.operationType = operationType; } } }
protected override void OnMouseDown(MouseEventArgsExtend args) { base.OnMouseDown(args); this.isMouseDown = true; this.isShiftDown = KeyboardExtend.IsModifyKeyDown(ModifierType.ShiftMask); this.moveDirection = MoveDirection.NONE; this.lastRotation = 0f; if (this.selectedObjects != null) { foreach (VisualObject current in this.SelectedObjects) { if (current.Recorder.IsAutoRecord) { current.Recorder.Stop(true); } else { LogConfig.Logger.Error("don't try to start a auto record object's record"); } } } this.rotationChanged = false; this.scaleChanged = false; this.positionChanged = false; TimelineActionManager.Instance.CanAutoCreateFirstFrame = false; this.lastMousePoint = args.Point; this.controlPointType = (ControlPointType)this.CSCom.GetControlPointType(); }