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(); }
protected override void OnMouseUp(MouseEventArgsExtend args) { base.OnMouseUp(args); TimelineActionManager.Instance.CanAutoCreateFirstFrame = true; if (this.selectedParentObjects != null && TimelineActionManager.Instance.AutoKey) { TimelineActionManager.Instance.CanGotoFrame = false; foreach (VisualObject current in this.SelectedObjects) { this.AutoCreateFirstFrame(current, typeof(PositionFrame).Name); this.AutoCreateFirstFrame(current, typeof(ScaleFrame).Name); this.AutoCreateFirstFrame(current, typeof(RotationSkewFrame).Name); } TimelineActionManager.Instance.CanGotoFrame = true; TimelineActionManager.Instance.CurrentTimelineAction.CurrentFrameIndex = TimelineActionManager.Instance.CurrentFrameIndex; } if (this.selectedObjects != null) { foreach (VisualObject current in this.SelectedObjects) { if (!current.Recorder.IsAutoRecord) { current.Recorder.Start(true, false); } else { LogConfig.Logger.Error("don't try to start a auto record object's record"); } } } this.isMouseDown = false; this.isMouseMoved = false; }
protected override void inputDispatch_AfterMouseUp(MouseEventArgsExtend args, IEnumerable <VisualObject> selectedParentObject) { base.inputDispatch_AfterMouseUp(args, selectedParentObject); if (this.bMouseValid) { selectedParentObject.ForEach <VisualObject>((System.Action <VisualObject>)(a => a.MouseUp(args))); } this.bMouseValid = false; args.Handled = true; }
protected override void OnMouseMove(MouseEventArgsExtend args) { base.OnMouseMove(args); if (this.OperationFlag.HasFlag(OperationMask.MoveFlag) && base.lastClickPoint != null && this.lastMousePoint != args.Point && this.operationType != OperationType.OPERATION_NONE && this.selectedObjects != null && this.selectedObjects.Count <VisualObject>() != 0) { this.updateLastMousePoint = true; this.HandleMouseMove(args.Point); if (this.updateLastMousePoint) { this.lastMousePoint = args.Point; } } }
protected override void inputDispatch_AfterMouseUp(MouseEventArgsExtend args, IEnumerable <VisualObject> selectedParentObject) { base.inputDispatch_AfterMouseUp(args, selectedParentObject); if (this.bMouseValid) { selectedParentObject.ForEach(delegate(VisualObject a) { a.MouseUp(args); }); } this.bMouseValid = false; args.Handled = true; }
protected virtual void inputDispatch_AfterMouseUp(MouseEventArgsExtend args, IEnumerable <VisualObject> selectedParentObject) { if (!this.isMouseUped && this.isMouseDowned) { this.isMouseDowned = false; foreach (VisualObject current in selectedParentObject) { current.Recorder.Start(true, false); } this.undoManager.EndCompositeTask(); this.isMouseUped = true; } }
protected override void inputDispatch_BeforeMouseDown(MouseEventArgsExtend args, IEnumerable <VisualObject> selectedParentObject) { if (TimelineActionManager.Instance.IsPlaying) { TimelineActionManager.Instance.Play(false); } base.inputDispatch_BeforeMouseDown(args, selectedParentObject); if (args.Button == MouseButton.Left) { this.bMouseValid = true; selectedParentObject.ForEach <VisualObject>((System.Action <VisualObject>)(a => a.MouseDown(args))); } args.Handled = true; }
protected override void inputDispatch_BeforeMouseMove(MouseEventArgsExtend args, IEnumerable <VisualObject> selectedParentObject) { base.inputDispatch_BeforeMouseMove(args, selectedParentObject); VisualObject visualObject = (VisualObject)null; if (args != null && args.HitResult != null) { visualObject = args.HitResult.HitVisual; } if (this.bMouseValid) { selectedParentObject.ForEach <VisualObject>((System.Action <VisualObject>)(a => a.MouseMove(args))); } args.Handled = true; }
protected override void OnMouseMove(MouseEventArgsExtend args) { base.OnMouseMove(args); if (!this.OperationFlag.HasFlag((Enum)OperationMask.MoveFlag) || this.lastClickPoint == null || (this.lastMousePoint == args.Point || this.operationType == OperationType.OPERATION_NONE) || this.selectedObjects == null || this.selectedObjects.Count <VisualObject>() == 0) { return; } this.updateLastMousePoint = true; this.HandleMouseMove(args.Point); if (!this.updateLastMousePoint) { return; } this.lastMousePoint = args.Point; }
protected override void inputDispatch_BeforeMouseMove(MouseEventArgsExtend args, IEnumerable <VisualObject> selectedParentObject) { base.inputDispatch_BeforeMouseMove(args, selectedParentObject); if (args != null && args.HitResult != null) { VisualObject hitVisual = args.HitResult.HitVisual; } if (this.bMouseValid) { selectedParentObject.ForEach(delegate(VisualObject a) { a.MouseMove(args); }); } args.Handled = true; }
protected virtual void inputDispatch_BeforeMouseDown(MouseEventArgsExtend args, IEnumerable <VisualObject> selectedParentObject) { if (this.isMouseDowned) { this.isMouseDowned = false; foreach (BaseObject mouseDownObject in this.mouseDownObjectList) { mouseDownObject.Recorder.Start(true, false); } this.undoManager.EndCompositeTask(); } else { this.isMouseUped = false; this.undoManager.BeginCompositeTask((string)null); foreach (BaseObject baseObject in selectedParentObject) { baseObject.Recorder.Stop(false); } this.isMouseDowned = true; this.mouseDownObjectList = selectedParentObject; } }
protected virtual void inputDispatch_AfterMouseDown(MouseEventArgsExtend args, IEnumerable <VisualObject> selectedParentObject) { }
protected virtual void inputDispatch_BeforeMouseMove(MouseEventArgsExtend args, IEnumerable <VisualObject> selectedParentObject) { }