public virtual docScript compose(docScript script) { script = this.checkScript(script); script.x_scopeIn(this); header.compose(script); navigation.compose(script); script.AppendLine(); foreach (PropertyCollection pc in dataset) { script.c_line(); string tablename = pc.getAndRemoveProperString(templateFieldDataTable.data_tablename); string desc = pc.getAndRemoveProperString(templateFieldDataTable.data_tabledesc); script.pairs(tablename, desc, pc, "", 2, false); script.AppendLine(); } footer.compose(script); //script.add(appendType.i_page, docScriptArguments.dsa_name, docScriptArguments.dsa_title,docScriptArguments.dsa_description) // .set(name, pageTitle, pageDescription); // script.add(appendType.s_settings).arg(docScriptArguments.dsa_stylerSettings, settings); /// script.add(appendType.s_palette).arg(acePaletteRole.colorDefault); // script = this.subCompose(script); script.x_scopeOut(this); return(script); }
public override docScript compose(docScript script = null) { if (templateNeedle.isNullOrEmpty()) { script.AppendFile(includeFilePath, filename, isDataTemplate); } else { script.AppendFileTemplated(includeFilePath, templateNeedle, filename, isDataTemplate, false); } if (!caption.isNullOrEmpty()) { script.AppendHeading(caption, 4); script.AppendLine(description); script.AppendLink(filename, filename, description, appendLinkType.link); } return(script); }
public docScript composeForPalette(docScript script, Color baseColor, float bright, float sat, int hue, string title, bool doLabels = false) { script.x_moveToCorner(textCursorZoneCorner.Top); script.x_move(textCursorZoneCorner.Right, 1, true); script.x_moveToCorner(textCursorZoneCorner.Left); if (doLabels) { script.s_width(0, 13); } else { script.s_width(0, 23); } Color altOne = baseColor; //.getVariation(bright, sat, hue); aceColorPalette pal = new aceColorPalette(altOne.ColorToHex()); //.toHexColor()); if (doLabels) { script.AppendLine(); script.AppendLine(appendType.bold, "Title"); script.AppendLine(); script.AppendLine(); script.AppendLine(appendType.heading_2, "Base color"); script.AppendLine(); script.AppendLine(appendType.regular, "Bright", appendRole.tableColumnHead); script.AppendLine(appendType.regular, "Saturation", appendRole.tableColumnFoot); script.AppendLine(appendType.regular, "Hue", appendRole.tableBetween); } else { script.AppendLine(appendType.heading_2, "Palette"); script.AppendLine(appendType.bold, title); script.AppendLine(); script.AppendLine(appendType.heading_2, "Base color", appendRole.tableColumnHead); script.s_settings(altOne, Color.Black); script.AppendLine(appendType.bold, pal.hexColor); script.AppendLine(appendType.heading_2, "Change"); script.AppendLine(appendType.regular, bright.ToString(), appendRole.tableColumnHead); script.AppendLine(appendType.regular, sat.ToString(), appendRole.tableColumnFoot); script.AppendLine(appendType.regular, hue.ToString(), appendRole.tableBetween); } if (doLabels) { script.AppendLine(appendType.regular, "bgColors"); } else { script.AppendLine(appendType.regular, "Background variations"); } for (int i = 0; i < pal.ccount; i++) { if (doLabels) { script.AppendLine(); script.AppendLine(appendType.bold, i.ToString()); } else { script.AppendLine(appendType.bold, pal.bgColors[i].ColorToHex()); script.s_settings(pal, i, acePaletteShotResEnum.background).isHorizontal = false; } } if (doLabels) { script.AppendLine(appendType.regular, "tpColors"); } else { script.add(appendType.regular, "Border variations", false); } for (int i = 0; i < pal.ccount; i++) { if (doLabels) { script.AppendLine(); script.AppendLine(appendType.bold, i.ToString()); } else { script.AppendLine(appendType.bold, pal.tpColors[i].ColorToHex()); script.s_settings(pal, i, acePaletteShotResEnum.border).isHorizontal = false; } } if (doLabels) { script.AppendLine(appendType.regular, "fgColors"); } else { script.add(appendType.regular, "Foreground variations", false); } for (int i = 0; i < pal.ccount; i++) { if (doLabels) { script.AppendLine(); script.AppendLine(appendType.bold, i.ToString()); } else { script.AppendLine(appendType.bold, pal.fgColors[i].ColorToHex()); script.s_settings(pal, i, acePaletteShotResEnum.foreground).isHorizontal = false; } } return(script); }