public PointWithSign(Point leftCorner, Point rightCorner, ISourceWithTranslation text) { LeftCorner = leftCorner; RightCorner = rightCorner; SourceText = text.Source.Text; TranslationText = text.Translation.Text; }
private GapsTrainerItem ConvertToGapsItem(ISourceWithTranslation sourceWithTranslation) { var item = new GapsTrainerItem { Id = sourceWithTranslation.Id, TextForUser = GetTextWithGaps(sourceWithTranslation.Source.Text), Original = sourceWithTranslation.Source, Translation = sourceWithTranslation.Translation }; return(item); }
public void AddRectangle(Point leftCorner, Point rightCorner, ISourceWithTranslation text) { var leftPointWithShift = new Point(leftCorner.X + _leftX, leftCorner.Y + _leftY); var rightPointWithShift = new Point(rightCorner.X + _leftX, rightCorner.Y + _leftY); var pointWithSign = new PointWithSign(leftPointWithShift, rightPointWithShift, text); if (_isHorizontalLine) { AddPoint(pointWithSign, leftPointWithShift.Y, rightPointWithShift.Y, _centerY); } else { AddPoint(pointWithSign, leftPointWithShift.X, rightPointWithShift.X, _centerX); } }