public void Execute() { if (screenModel.Layout != ScreenLayoutType.TRIPLE) { return; } PlaceholderModel placeholder = collectionModel.Get(args.PlaceholderId); ScreenPositionType currentScreen = ScreenUtils.GetScreen(placeholder); R3ePoint screenOffset = ScreenUtils.ToScreenOffset(placeholder, args.ScreenType); R3ePoint newPosition = new R3ePoint(placeholder.Position.X + screenOffset.X, placeholder.Position.Y + screenOffset.Y); if (!newPosition.Equals(placeholder.Position)) { placeholder.Move(newPosition); } }
public void Execute() { PlaceholderModel placeholder = collectionModel.Get(args.View.Model.Id); placeholder.Move(moveValidator.GetValidPosition(placeholder, GetR3eLocation(args.Point))); }