public override string GetText(RenderableData context, CssProperty property) { if (context == null) { return(""); } // Get the document: ReflowDocument doc = context.computedStyle.reflowDocument; if (System_ == null) { // Get the system by name: Css.Value style = Style; if (style != null) { System_ = doc.GetCounter(style.Text); } else { System_ = null; } if (System_ == null) { // Default to decimal: System_ = CounterSystems.Decimal; } } return(System_.Get(doc.Renderer.GetCounter(Counter), false)); }
public override string GetText(RenderableData context, CssProperty property) { if (context == null) { return(""); } // Get the document: ReflowDocument doc = context.computedStyle.reflowDocument; if (System_ == null) { // Get the system by name: Css.Value style = Style; if (style != null) { System_ = doc.GetCounter(style.Text); } else { System_ = null; } if (System_ == null) { // Default to decimal: System_ = CounterSystems.Decimal; } } // Get all counters from the system and join them: List <CssCounter> counters = doc.Renderer.Counters; if (counters == null) { return(""); } // Go forward here: string result = ""; for (int i = 0; i < counters.Count; i++) { if (counters[i].Name == Counter) { // Got one! Add it on: if (result != "") { result += Separator; } result += System_.Get(counters[i].Count, false); } } return(result); }