Пример #1
0
        /// <summary>
        /// Converts <see cref="ATMarkDTO"/> to requested entity type
        /// </summary>
        /// <param name="mark">the mark</param>
        /// <param name="existing">existing item</param>
        /// <returns>corresponding entity</returns>
        public ATRotation ToRotationItem(ATMarkDTO mark, ATRotation existing)
        {
            var o = existing ?? new ATRotation();

            o.Mark = this.ToMark(mark, null != existing ? existing.Mark : null);
            return(o);
        }
Пример #2
0
        /// <summary>
        /// Converts <see cref="ATMarkDTO"/> to requested entity type
        /// </summary>
        /// <param name="mark">the mark</param>
        /// <param name="existing">existing item</param>
        /// <returns>corresponding entity</returns>
        public ATShape ToShape(ATMarkDTO mark, ATShape existing)
        {
            var o = existing ?? new ATShape();

            o.Mark          = this.ToMark(mark, null != existing ? existing.Mark : null);
            o.Color         = mark.color;
            o.FillColor     = mark.fillColor;
            o.FillOpacity   = mark.fillOpacity;
            o.Height        = mark.height;
            o.Image         = mark.image;
            o.Points        = mark.points;
            o.PositionX     = mark.positionX;
            o.PositionY     = mark.positionY;
            o.StrokeOpacity = mark.strokeOpacity;
            o.StrokeWidth   = mark.strokeWidth;
            o.Text          = mark.text;
            o.Width         = mark.width;

            o.LabelText          = mark.labelText;
            o.LabelTextColor     = mark.labelTextColor;
            o.NumberingTextColor = mark.numberingTextColor;
            o.StampColor         = mark.stampColor;
            o.Style = mark.style;
            return(o);
        }
Пример #3
0
        /// <summary>
        /// Converts <see cref="ATMarkDTO"/> to requested entity type
        /// </summary>
        /// <param name="mark">the mark</param>
        /// <param name="existing">existing item</param>
        /// <returns>corresponding entity</returns>
        public ATFormula ToFormula(ATMarkDTO mark, ATFormula existing)
        {
            var o = existing ?? new ATFormula();

            o.Mark      = this.ToMark(mark, null != existing ? existing.Mark : null);
            o.PositionX = mark.positionX;
            o.PositionY = mark.positionY;
            o.Equation  = mark.text;
            o.Width     = mark.width;
            o.Height    = mark.height;
            return(o);
        }
Пример #4
0
        /// <summary>
        /// Converts <see cref="ATMarkDTO"/> to requested entity type
        /// </summary>
        /// <param name="mark">the mark</param>
        /// <param name="existing">existing item</param>
        /// <returns>corresponding entity</returns>
        public ATMark ToMark(ATMarkDTO mark, ATMark existing)
        {
            var o = existing ?? new ATMark();

            o.IsReadonly    = mark.@readonly;
            o.PageIndex     = mark.pageIndex;
            o.Rotation      = mark.rotation;
            o.DisplayFormat = mark.displayFormat;
            o.Type          = mark.type;
            o.Rotation      = mark.rotation;
            return(o);
        }
Пример #5
0
        /// <summary>
        /// Converts <see cref="ATMarkDTO"/> to requested entity type
        /// </summary>
        /// <param name="mark">the mark</param>
        /// <param name="existing">existing item</param>
        /// <returns>corresponding entity</returns>
        public ATTextItem ToTextItem(ATMarkDTO mark, ATTextItem existing)
        {
            var o = existing ?? new ATTextItem();

            o.Mark      = this.ToMark(mark, null != existing ? existing.Mark : null);
            o.Color     = mark.color;
            o.Text      = mark.text;
            o.Height    = mark.height;
            o.PositionX = mark.positionX;
            o.PositionY = mark.positionY;
            o.Width     = mark.width;
            o.FontSize  = mark.fontSize;
            return(o);
        }
Пример #6
0
        /// <summary>
        /// Converts <see cref="ATMarkDTO"/> to requested entity type
        /// </summary>
        /// <param name="mark">the mark</param>
        /// <param name="existing">existing item</param>
        /// <returns>corresponding entity</returns>
        public ATHighlightStrikeOut ToHighlightStrikeOut(ATMarkDTO mark, ATHighlightStrikeOut existing)
        {
            var o = existing ?? new ATHighlightStrikeOut();

            o.Color         = mark.color;
            o.Mark          = this.ToMark(mark, null != existing ? existing.Mark : null);
            o.Height        = mark.height;
            o.PositionX     = mark.positionX;
            o.PositionY     = mark.positionY;
            o.Width         = mark.width;
            o.HasSelection  = mark.has_selection;
            o.SelectionInfo = mark.selection_info;
            o.SelectionText = mark.selection_text;
            return(o);
        }
Пример #7
0
        /// <summary>
        /// Converts <see cref="ATMarkDTO"/> to requested entity type
        /// </summary>
        /// <param name="mark">the mark</param>
        /// <param name="existing">existing item</param>
        /// <returns>corresponding entity</returns>
        public ATPicture ToPicture(ATMarkDTO mark, ATPicture existing)
        {
            var o = existing ?? new ATPicture();

            o.Mark           = this.ToMark(mark, null != existing ? existing.Mark : null);
            o.PositionX      = mark.positionX;
            o.PositionY      = mark.positionY;
            o.Height         = mark.height;
            o.Width          = mark.width;
            o.LabelFontSize  = mark.fontSize;
            o.LabelText      = mark.labelText;
            o.LabelTextColor = mark.labelTextColor;
            o.Image          = mark.imageData;
            o.Path           = mark.image;
            return(o);
        }
Пример #8
0
        /// <summary>
        /// Converts <see cref="ATMarkDTO"/> to requested entity type
        /// </summary>
        /// <param name="mark">the mark</param>
        /// <param name="existing">existing item</param>
        /// <returns>corresponding entity</returns>
        public ATAnnotation ToAnnotation(ATMarkDTO mark, ATAnnotation existing)
        {
            var o = existing ?? new ATAnnotation();

            o.Mark      = this.ToMark(mark, null != existing ? existing.Mark : null);
            o.PositionX = mark.positionX;
            o.PositionY = mark.positionY;
            o.Comment   = mark.text;
            o.Width     = mark.width;
            o.Height    = mark.height;
            o.IconName  = mark.style;
            //o.IsOpened = mark.;
            o.Color       = mark.color;
            o.CreatedBy   = mark.createdBy;
            o.FillOpacity = mark.fillOpacity;
            return(o);
        }