Beispiel #1
0
 public PointWithSign(Point leftCorner, Point rightCorner, ISourceWithTranslation text)
 {
     LeftCorner      = leftCorner;
     RightCorner     = rightCorner;
     SourceText      = text.Source.Text;
     TranslationText = text.Translation.Text;
 }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
            }
        }