Exemplo n.º 1
0
 public CoffeeViewModel()
 {
     GroundList = Persistence.GetOrCreateSettings();
     foreach (GroundModel Model in GroundList)
     {
         Model.Parent           = this;
         Model.PropertyChanged += (s, e) => { NotifyChange("GroundList"); };
     }
     CurrentGround = GroundList[0];
 }
Exemplo n.º 2
0
        public void CreateNewGround()
        {
            GroundModel newg = new GroundModel()
            {
                Parent = this
            };

            newg.PropertyChanged += (s, e) => { NotifyChange("GroundList"); };
            GroundList.Add(newg);
            CurrentGround = newg;
            NotifyChange("GroundList");
            NotifyChange("CurrentGround");
        }