Broke the surface editor

Added device properties to surface editor though!
This commit is contained in:
Robert committed 2019-11-21 19:09:50 +01:00
1 parent 086f2fc1f9
commit 240efb2907
20 files changed
+444 -79

No files matched your search

@@ -0,0 +1,19 @@
using FluentValidation;
namespace Artemis.UI.Screens.SurfaceEditor.Dialogs
{
public class SurfaceDeviceConfigViewModelValidator : AbstractValidator<SurfaceDeviceConfigViewModel>
{
public SurfaceDeviceConfigViewModelValidator()
{
RuleFor(m => m.X).GreaterThanOrEqualTo(0).WithMessage("X-coordinate must be 0 or greater");
RuleFor(m => m.Y).GreaterThanOrEqualTo(0).WithMessage("Y-coordinate must be 0 or greater");
RuleFor(m => m.Scale).GreaterThanOrEqualTo(0.2).WithMessage("Scale must be 0.2 or greater");
RuleFor(m => m.Rotation).GreaterThanOrEqualTo(0).WithMessage("Rotation must be 0 or greater");
RuleFor(m => m.Rotation).LessThanOrEqualTo(359).WithMessage("Rotation must be 359 or less");
}
}
}