using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Dakota.Models.Daten { internal class DatenelementCounter : DatenelementFiller { public Func Counter { get; private set; } public DatenelementCounter(string title, int count, Func counter) : this(title, count, counter, count) { } public DatenelementCounter(string title, int count, Func counter, int filllen) : base(title, count, filllen) { Counter = counter; } public void Update() { var value = Counter(); SetValue(value.ToString("D" + MinStellen.ToString())); } public override string GetValue() { Update(); return base.GetValue(); } } }