31 lines
661 B
C#
31 lines
661 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Dakota.Models
|
|
{
|
|
internal class DatenelementCounter : Datenelement
|
|
{
|
|
public Func<int> Counter { get; private set; }
|
|
|
|
public DatenelementCounter(string title, int count, Func<int> counter) : base(title, count, Feldart.Muss)
|
|
{
|
|
Counter = counter;
|
|
}
|
|
|
|
public void Update()
|
|
{
|
|
SetFilledIntValue(Counter(), MinStellen);
|
|
}
|
|
|
|
public override string GetValue()
|
|
{
|
|
Update();
|
|
|
|
return base.GetValue();
|
|
}
|
|
}
|
|
}
|