#pragma warning disable CS1574 // XML comment has cref attribute 'execute(string, imbSCI.Core.reporting.format.reportOutputFormatName, PropertyCollection, string)' that could not be resolved /// <summary> /// Execution context with all resorces required internally. /// </summary> /// <remarks> /// <para>It will not start compilation instantly. Once you're ready <see cref="docScriptExecution.execute(string, imbSCI.Core.reporting.format.reportOutputFormatName, PropertyCollection, string)"/> method should be called.</para> /// /// </remarks> /// <param name="__render">The render - particular output engine</param> /// <param name="__style">The style - colors and fonts</param> /// <param name="__script">The script - script with templated content</param> /// <param name="__data">The data - initial data</param> public docScriptExecution(string name, styleTheme __style, PropertyCollection __data, params ITextRender[] __renders) : base(name.add("_compile_log"), true) #pragma warning restore CS1574 // XML comment has cref attribute 'execute(string, imbSCI.Core.reporting.format.reportOutputFormatName, PropertyCollection, string)' that could not be resolved { List <ITextRender> renders = __renders.getFlatList <ITextRender>(); setup(__style, __data, __renders); }
/// <summary> /// Creation of new theme /// </summary> /// <param name="name"></param> /// <param name="baseColorA"></param> /// <param name="baseColorB"></param> /// <param name="baseColorC"></param> /// <param name="pageFontName"></param> /// <param name="headingFontName"></param> /// <returns></returns> public metaDocumentTheme makeStandardTheme(string name, string baseColorA, string baseColorB, string baseColorC, aceFont pageFontName, aceFont headingFontName) { styleTheme stil = new styleTheme(aceBaseColorSetEnum.aceBrightAndStrong, 28, 12, new fourSideSetting(4), new fourSideSetting(2), pageFontName, headingFontName); metaDocumentTheme theme = null; //= new metaDocumentTheme(name, stil); // Add(theme); return(theme); }
/// <summary> /// Setups for section. /// </summary> /// <param name="_theme">The theme.</param> /// <param name="area">The area.</param> /// <param name="loadPreset">if set to <c>true</c> [load preset].</param> public void setupForSection(styleTheme _theme, selectRangeArea area, Boolean loadPreset = false) { // _area = new selectRangeArea(cur.x, cur.y, cur.x + 1, data.Keys.Count + cur.y); if (loadPreset) { loadPresetForSection(); } _headZone = area.expand(textCursorZoneCorner.Top, doInsertHeader); _leftZone = area.expand(textCursorZoneCorner.Left, doInsertRowId); _footZone = area.expand(textCursorZoneCorner.Bottom, doInsertFooter); }
/// <summary> /// Initializes a new instance of the <see cref="analyticJob"/> class. /// </summary> public analyticJob() { testInfo = new testDefinition("Spider comparative experiment", "The test performes Key Pages detection running four different Spider algorithms for each item in selected sample scope.", 1); DeliveryUnit = new deliveryUnitBootmarkReport(); DeliveryUnit.setup(); // sampleTags = imbWEMManager.settings.sampleGroup.SplitSmart(",", "primary"); //sampleGroup = imbAnalyticsEngine.imbWEMManager.webProfileGroups.primarySample; // report = new sampleProcessReport(); theme = new styleTheme(colorSet: aceBaseColorSetEnum.imbScience, h1Size: 16, pSize: 14, margin: 4, padding: 4, pageFontName: aceFont.TrebuchetMS, headingFontName: aceFont.TrebuchetMS); spider = new spiderUnit(); }
protected void setup(styleTheme __style, PropertyCollection __data, IEnumerable <ITextRender> __renders) { theme = __style; foreach (ITextRender __rend in __renders) { builder.Add(__rend); if (doVerboseLog) { log("docScriptExecution <---> render[" + __rend.GetType().Name + "]"); } } data = __data; }
/// <summary> /// automatic execution during construction of object /// </summary> /// <param name="stil"></param> internal void deployStil(styleTheme stil) { basicStyle = stil; //palleteA = aceColorPaletteManager.getPalette("A", stil.colors[0]); //palleteB = aceColorPaletteManager.getPalette("B", stil.colors[1]); //palleteC = aceColorPaletteManager.getPalette("C", stil.colors[2]); //var headingFontName = stil.fontForHeadings; //var pageFontName = stil.fontForText; //if (pageFontName == aceFont.none) pageFontName = aceFont.Tahoma; //font = new styleTextFont(pageFontName); //if (headingFontName == aceFont.none) //{ // headingFontName = pageFontName; //} //fontHeading = new styleTextFont(headingFontName); }
public stylerForRange(styleTheme _theme, PropertyCollection data, cursor cur) { theme = _theme; setupForVariables(data, cur, data.getAndRemove("dsa_title", "").toStringSafe(), data.getAndRemove("dsa_footer", "").toStringSafe(), "", true); }
public static String getCodeName(appendRole __role, appendType __type, styleTheme theme) { return(__role.ToString() + "_" + __type.ToString() + "_" + theme.getCodeName()); }
internal void processRole(appendRole __role, appendType __type, styleTheme theme) { role = __role; type = __type; Int32 sizeKWidth = 8; Int32 sizeKHeight = 1; themeCodeName = theme.getCodeName(); var sizeEnum = imbStringMarkdownExtensions.getTextSizeEnum(__type); var size = theme.fontSize.headingSizes[sizeEnum.ToInt32()]; fourSideSetting margin = theme.fontSize.headingMargins[sizeEnum.ToInt32()]; fourSideSetting padding = theme.fontSize.headingPaddings[sizeEnum.ToInt32()]; sizeAndBorder.apply(margin, styleFourSideParameter.margin); sizeAndBorder.apply(padding, styleFourSideParameter.padding); String roleName = role.ToString(); aligment = textCursorZoneCorner.Left; if (roleName.StartsWith("merged")) { doWrapText = true; doCallForMerge = true; } if (roleName.StartsWith("section")) { doWrapText = true; } if (roleName.EndsWith("Head")) { aligment = textCursorZoneCorner.center; sizeAndBorder.bottom.type = styleBorderType.Thin; } if (roleName.EndsWith("Foot")) { aligment = textCursorZoneCorner.Left; sizeAndBorder.top.type = styleBorderType.Thin; } switch (role) { case appendRole.none: break; case appendRole.mergedHead: break; case appendRole.mergedContent: break; case appendRole.mergedFoot: break; case appendRole.sectionHead: break; case appendRole.sectionContent: break; case appendRole.sectionFoot: break; case appendRole.majorHeading: break; case appendRole.minorHeading: break; case appendRole.paragraph: break; case appendRole.remark: break; case appendRole.tableHead: sizeAndBorder.top.type = styleBorderType.Double; doWrapText = true; doCallForMerge = true; break; case appendRole.tableColumnHead: doWrapText = true; break; case appendRole.tableColumnFoot: sizeAndBorder.top.type = styleBorderType.Dotted; break; case appendRole.tableCellValue: break; case appendRole.tableCellAnnotation: sizeAndBorder.top.type = styleBorderType.Dotted; sizeAndBorder.bottom.type = styleBorderType.Dotted; break; case appendRole.tableCellNovalue: break; case appendRole.tableBetween: sizeAndBorder.top.type = styleBorderType.Dotted; sizeAndBorder.bottom.type = styleBorderType.Dotted; break; case appendRole.tableFoot: sizeAndBorder.bottom.type = styleBorderType.Double; break; case appendRole.i_container: break; case appendRole.i_margin: sizeKHeight = 1; sizeKWidth = 1; break; case appendRole.i_line: break; default: break; } minSize = new styleSize(size * sizeKWidth, size * sizeKHeight); minSize.width += sizeAndBorder.left.padding + sizeAndBorder.right.padding; minSize.height += sizeAndBorder.top.padding + sizeAndBorder.bottom.padding; }
public styleContainerShotProvider(styleTheme _theme) { theme = _theme; }
public styleBorderProvider(styleTheme _theme) : base(_theme) { }
/// <summary> /// Styling information based on <c>appendType</c> and <c>styleTheme</c> /// </summary> /// <param name="type">The type.</param> /// <param name="theme">The theme.</param> public styleTextShot(appendType type, styleTheme theme) { processType(type, theme); themeCodeName = theme.getCodeName(); }
/// <summary> /// Initializes a new instance of the <see cref="docScriptExecution"/> class. /// </summary> /// <param name="name">The name.</param> /// <param name="__style">The style.</param> /// <param name="__data">The data.</param> /// <param name="__renders">The renders.</param> public docScriptExecution(string name, styleTheme __style, PropertyCollection __data, IEnumerable <ITextRender> __renders) : base(name.add("_compile_log"), true) { List <ITextRender> renders = __renders.getFlatList <ITextRender>(); setup(__style, __data, __renders); }
public styleTextShotProvider(styleTheme _theme) { theme = _theme; }
public stylerForRange(styleTheme _theme, DataTable table, cursor cur) { theme = _theme; setupForTable(table, cur); }
/// <summary> /// Unconfigured instance <see cref="stylerForRange"/> class. /// </summary> /// <param name="_theme">The theme.</param> public stylerForRange(styleTheme _theme) : base() { theme = _theme; }
//public styleTextShot(appendType type, styleTheme theme) //{ // this.type = type; // this.theme = theme; //} /// <summary> /// Processes the <c>appendType</c> and <c>styleTheme</c> to define all styling information /// </summary> /// <param name="__type">The type.</param> /// <param name="theme">The theme.</param> internal void processType(appendType __type, styleTheme theme) { type = __type; sizeEnum = imbStringMarkdownExtensions.getTextSizeEnum(type); fontStyle = new FontStyle(); if (theme.fontSize.isThisHeading(sizeForFont)) { font = theme.fontForHeadings.drawingFont; } else { font = theme.fontForText.drawingFont; } sizeForFont = theme.fontSize.headingSizes[sizeEnum.ToInt32()]; doCallForInverse = theme.fontSize.isThisMajorHeading(sizeEnum); switch (type) { case appendType.squareQuote: fontStyle = FontStyle.Italic | FontStyle.Underline; break; case appendType.blockquote: fontStyle = FontStyle.Italic | FontStyle.Bold; break; case appendType.marked: fontStyle = FontStyle.Underline; break; case appendType.quotation: case appendType.italic: fontStyle = FontStyle.Italic; break; case appendType.bold: fontStyle = FontStyle.Bold; break; case appendType.monospace: fontStyle = FontStyle.Regular; //target.Font.SetFromFont(System.Drawing.SystemFonts.DefaultFont); break; case appendType.math: case appendType.source: case appendType.sourceCS: case appendType.sourceJS: case appendType.sourcePY: case appendType.sourceXML: break; case appendType.striketrough: fontStyle = FontStyle.Strikeout; break; case appendType.comment: modification = styleTextModificationEnum.smaller; break; } }
/// <summary> /// The prefered way of obtaining style information /// </summary> /// <param name="role">The role of particular append</param> /// <param name="__type">The type of particular append</param> /// <param name="theme">The theme to use fonts and size settings from</param> public styleTextShot(appendRole role, appendType __type, styleTheme theme) { processRole(role); processType(__type, theme); themeCodeName = theme.getCodeName(); }
public styleContainerShot(appendRole __role, appendType __type, styleTheme theme) { processRole(__role, __type, theme); }
public styleShotSet(appendRole role, appendType type, acePaletteVariationRole colorRole, acePaletteRole paletteRole, Boolean isInverse, styleTheme theme) { palette = theme.palletes.getShotSet(colorRole, isInverse, paletteRole); text = theme.textShotProvider.getShotSet(role, type); container = theme.styleContainerProvider.getShotSet(role, type); }
//protected IStyleInstruction resolveInstruction(appendRole role, styleApplicationFlag aFlag) //{ // IStyleInstruction output = null; // appendType type = role. // styleShotSet shot = new styleShotSet(role) // if (flags.HasFlag(styleApplicationFlag.autoByRole)) // { // } //} #pragma warning disable CS1574 // XML comment has cref attribute 'appendType' that could not be resolved /// <summary> /// Resolves autoshot into a series of instructions /// </summary> /// <param name="theme">The active teme</param> /// <param name="__resources">Resources: set of style related enums and appendType</param> /// <seealso cref="aceCommonTypes.enums.appendType"/> /// <seealso cref="acePaletteRole"/> /// <seealso cref="appendRole"/> /// <seealso cref="acePaletteVariationRole"/> /// <returns></returns> public List <IStyleInstruction> resolve(styleTheme theme, params Object[] __resources) #pragma warning restore CS1574 // XML comment has cref attribute 'appendType' that could not be resolved { List <IStyleInstruction> output = new List <IStyleInstruction>(); acePaletteVariationRole colorRole = acePaletteVariationRole.none; List <Int32> xy = __resources.getAllOfType <Int32>(false); //--------- applying customizations appendType type = __resources.getFirstOfType <appendType>(false, appendType.none); appendRole role = __resources.getFirstOfType <appendRole>(false, appendRole.none); Boolean isInverse = __resources.getFirstOfType <Boolean>(false, false); acePaletteRole paletteRole = __resources.getFirstOfType <acePaletteRole>(false, acePaletteRole.none); if (role == appendRole.none) { role = appendRole.paragraph; } //if ((role != appendRole.none) && (type == appendType.none)) //{ // type = role.convertRoleToType(); //} //if ((role != appendRole.none) && (colorRole == acePaletteVariationRole.none)) //{ // colorRole = role.convertRoleToVariationRole(); //} if (paletteRole == acePaletteRole.none) { flags &= ~styleApplicationFlag.enableColorShot; } if (flags.HasFlag(styleApplicationFlag.autoByVariator)) { var tmp = theme.styler.getStyleShot(xy[0], xy[1], type); if (flags.HasFlag(styleApplicationFlag.enableColorShot)) { palette = tmp.palette; //theme.palletes.getShotSet(colorRole, isInverse, paletteRole); } if (flags.HasFlag(styleApplicationFlag.enableTextShot)) { text = tmp.text; // theme.textShotProvider.getShotSet(role); } if (flags.HasFlag(styleApplicationFlag.enableContentShot)) { container = container; // = theme.styleContainerProvider.getShotSet(role, type); } } else { if (flags.HasFlag(styleApplicationFlag.enableColorShot)) { palette = theme.palletes.getShotSet(colorRole, isInverse, paletteRole); } if (flags.HasFlag(styleApplicationFlag.enableTextShot)) { text = theme.textShotProvider.getShotSet(role); } if (flags.HasFlag(styleApplicationFlag.enableContentShot)) { container = theme.styleContainerProvider.getShotSet(role, type); } } if (flags.HasFlag(styleApplicationFlag.setAsActive)) { theme.activeStyleInstruction = this; } foreach (IStyleInstruction inst in this) { if (inst != null) { output.Add(inst); } } return(output); }