protected override void SetNewValueTo(RotationControlViewModel viewModel) { var value = (viewModel.RotationAngle + _angle) % 360; viewModel.RotationAngle = value >= 180 ? value - 360 : value; }
public RotationControlView() { InitializeComponent(); DataContext = _rotationControlViewModel = new RotationControlViewModel(); }
public WorkAreaRotateRightCommand(RotationControlViewModel viewModel, int angle) : base(viewModel) { _angle = angle; }
protected override void SetNewValueTo(RotationControlViewModel viewModel) { viewModel.RotationAngle = 0; }
public WorkAreaResetRotationCommand(RotationControlViewModel viewModel) : base(viewModel) { }
protected abstract void SetNewValueTo(RotationControlViewModel viewModel);
protected WorkAreaRotationCommandBase(RotationControlViewModel viewModel) { ViewModel = viewModel; }