using System; namespace FastReport.Web.Toolbar { /// /// Button for the toolbar /// public class ToolbarButton : ToolbarElement { /// /// The image of the button that appears in the toolbar /// public ToolbarElementImage Image { get; set; } = new ToolbarElementImage(); /// /// Action that is triggered when the button is clicked /// public IClickAction OnClickAction { get; set; } internal override string Render(string template_FR) { if (!Enabled) return default; var action = OnClickAction is ElementScript scriptButton ? scriptButton.Script : $"{template_FR}.customMethodInvoke('{ID}', this.value)"; return $@"
"; } } }