1using System.ComponentModel;
3using Ctc.Palplus.Integration.Driver.Entities;
12 private Quantity mCurrentLevel;
14 public CoffeeIngredientContainer(CoffeeIngredient forPool,
string location,
string containerName, Quantity maxLevel, Quantity currentLevel)
17 Location = CoffeeConsumableManager.GetLocationIdentifier(forPool.ForDevice, location);
18 MaxLevel =
new Quantity(maxLevel.Value, maxLevel.Unit);
19 CurrentLevel =
new Quantity(currentLevel.Value, currentLevel.Unit);
20 ContainerName = containerName;
23 public string ContainerName {
get; }
25 public event PropertyChangedEventHandler PropertyChanged;
27 public string Location {
get; }
28 public Quantity MaxLevel {
get; }
30 public Quantity CurrentLevel
35 mCurrentLevel = value;
36 PropertyChanged?.Invoke(
this,
new PropertyChangedEventArgs(nameof(CurrentLevel)));
40 public void ModifyBy(Quantity relativeAmount)
42 if (relativeAmount !=
null)
44 CurrentLevel = CurrentLevel + relativeAmount;
48 public void SetTo(Quantity absoluteAmount)
50 CurrentLevel = absoluteAmount;
53 public CoffeeIngredientContainer Clone(CoffeeIngredient forPool)
55 return new CoffeeIngredientContainer(forPool, Location, ContainerName, MaxLevel, CurrentLevel);
Information about the available consumables with a common name (like "Water" or "Liners")
Implement this on the representation of a single source for some consumable.