Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HTMLExport"/> class.
 /// </summary>
 public HTMLExport()
 {
     Zoom               = 1.0f;
     HasMultipleFiles   = true;
     layers             = false;
     wysiwyg            = true;
     pictures           = true;
     webMode            = false;
     subFolder          = true;
     navigator          = true;
     singlePage         = false;
     widthUnits         = HtmlSizeUnits.Pixel;
     heightUnits        = HtmlSizeUnits.Pixel;
     imageFormat        = ImageFormat.Png;
     templates          = new HtmlTemplates();
     format             = HTMLExportFormat.HTML;
     prevStyleList      = null;
     prevStyleListIndex = 0;
     pageBreaks         = true;
     print              = false;
     preview            = false;
     saveStreams        = false;
     numberFormat       = new NumberFormatInfo();
     numberFormat.NumberGroupSeparator   = String.Empty;
     numberFormat.NumberDecimalSeparator = ".";
     exportMode = ExportType.Export;
     res        = new MyRes("Export,Html");
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HTMLExport"/> class.
 /// </summary>
 public HTMLExport()
 {
     Zoom                = 1.0f;
     FLayers             = false;
     FWysiwyg            = true;
     FPictures           = true;
     FWebMode            = false;
     FSubFolder          = true;
     FNavigator          = true;
     FSinglePage         = false;
     FThreaded           = false;
     FWidthUnits         = HtmlSizeUnits.Pixel;
     FHeightUnits        = HtmlSizeUnits.Pixel;
     FImageFormat        = ImageFormat.Png;
     FTemplates          = new HtmlTemplates();
     FFormat             = HTMLExportFormat.HTML;
     FPicsArchive        = new List <PicsArchiveItem>();
     FPrevStyleList      = null;
     FPrevStyleListIndex = 0;
     FPageBreaks         = true;
     FPrint              = false;
     FNumberFormat       = new NumberFormatInfo();
     FNumberFormat.NumberGroupSeparator   = String.Empty;
     FNumberFormat.NumberDecimalSeparator = ".";
     Res = new MyRes("Export,Html");
 }
Пример #3
0
        private string SizeValue(double value, double maxvalue, HtmlSizeUnits units)
        {
            FastString sb = new FastString(6);

            if (units == HtmlSizeUnits.Pixel)
            {
                sb.Append(Px(value));
            }
            else if (units == HtmlSizeUnits.Percent)
            {
                sb.Append(((int)Math.Round((value * 100 / maxvalue))).ToString()).Append("%");
            }
            else
            {
                sb.Append(value.ToString());
            }
            return(sb.ToString());
        }