123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- using FastReport.Utils;
- using System;
- using System.IO;
- namespace FastReport.Export
- {
- class ExportIEMObject
- {
- #region Private fields
- private TextRenderType textRenderType;
- private string text;
- private string originalText;
- private string bookmark;
- private Hyperlink hyperlink;
- private int styleIndex;
- private ExportIEMStyle style;
- private bool isText;
- private bool isRichText;
- private float left;
- private float top;
- private float width;
- private float height;
- private int counter;
- private System.Drawing.Image metafile;
- private MemoryStream pictureStream;
- private bool isBand;
- private string hash;
- private bool isBase;
- private object value;
- private bool isNumeric;
- private bool isDateTime;
- private bool isPercent;
- private bool isSvg;
- private Utils.InlineImageCache inlineImageCache;
- private ParagraphFormat paragraphFormat;
- private float tabWidth;
- private FloatCollection tabPositions;
- private bool autoSize;
- private int fx;
- private int fy;
- private int fdx;
- private int fdy;
- private bool exist;
- #endregion
- #region Private methods
- #endregion
- #region Public properties
- public bool AutoSize
- {
- get { return autoSize; }
- set { autoSize = value; }
- }
- public bool Base
- {
- get { return isBase; }
- set { isBase = value; }
- }
- public string Hash
- {
- get { return hash; }
- set { hash = value; }
- }
- public TextRenderType TextRenderType
- {
- get { return textRenderType; }
- set { textRenderType = value; }
- }
- /// <summary>
- /// This property for internal use only.
- /// </summary>
- public bool HtmlTags
- {
- get
- {
- switch (textRenderType)
- {
- case TextRenderType.HtmlTags:
- case TextRenderType.HtmlParagraph:
- return true;
- default:
- return false;
- }
- }
- set { textRenderType = value ? TextRenderType.HtmlTags : TextRenderType.Default; }
- }
- public string Text
- {
- get { return text; }
- set { text = value; }
- }
- public FloatCollection TabPositions
- {
- get { return tabPositions; }
- set { tabPositions = value; }
- }
- public string OriginalText
- {
- get { return originalText; }
- set { originalText = value; }
- }
- public string URL
- {
- get { return Hyperlink != null && Hyperlink.Kind == HyperlinkKind.URL ? Hyperlink.Value : ""; }
- }
- public string Bookmark
- {
- get { return bookmark; }
- set { bookmark = value; }
- }
- public Hyperlink Hyperlink
- {
- get { return hyperlink; }
- set { hyperlink = value; }
- }
- public int StyleIndex
- {
- get { return styleIndex; }
- set { styleIndex = value; }
- }
- public bool IsText
- {
- get { return isText; }
- set { isText = value; }
- }
- public bool IsRichText
- {
- get { return isRichText; }
- set { isRichText = value; }
- }
- public bool IsSvg
- {
- get { return isSvg; }
- set { isSvg = value; }
- }
- public float Left
- {
- get { return left; }
- set { left = value; }
- }
- public float Top
- {
- get { return top; }
- set { top = value; }
- }
- public float Width
- {
- get { return width; }
- set { width = value; }
- }
- public float Height
- {
- get { return height; }
- set { height = value; }
- }
- public ExportIEMStyle Style
- {
- get { return style; }
- set { style = value; }
- }
- public int Counter
- {
- get { return counter; }
- set { counter = value; }
- }
- public System.Drawing.Image Metafile
- {
- get { return metafile; }
- set { metafile = value; }
- }
- public MemoryStream PictureStream
- {
- get { return pictureStream; }
- set { pictureStream = value; }
- }
- public bool IsBand
- {
- get { return isBand; }
- set { isBand = value; }
- }
- public object Value
- {
- get { return value; }
- set { this.value = value; }
- }
- public bool IsNumeric
- {
- get { return isNumeric; }
- set { isNumeric = value; }
- }
- public bool IsDateTime
- {
- get { return isDateTime; }
- set { isDateTime = value; }
- }
- public bool IsPercent
- {
- get { return isPercent; }
- set { isPercent = value; }
- }
- public int x
- {
- get { return fx; }
- set { fx = value; }
- }
- public int y
- {
- get { return fy; }
- set { fy = value; }
- }
- public int dx
- {
- get { return fdx; }
- set { fdx = value; }
- }
- public int dy
- {
- get { return fdy; }
- set { fdy = value; }
- }
- public bool Exist
- {
- get { return exist; }
- set { exist = value; }
- }
- public Utils.InlineImageCache InlineImageCache
- {
- get { return inlineImageCache; }
- set { inlineImageCache = value; }
- }
- public ParagraphFormat ParagraphFormat
- {
- get { return paragraphFormat; }
- set { paragraphFormat = value; }
- }
- public float TabWidth
- {
- get { return tabWidth; }
- set { tabWidth = value; }
- }
- #endregion
- public ExportIEMObject()
- {
- isText = true;
- isNumeric = false;
- text = String.Empty;
- isBase = true;
- originalText = null;
- }
- }
- }
|