Ejemplo n.º 1
0
        public void AddMachine()
        {
            if (_windows.ShowDialog(IoC.Get <AddMachineViewModel>()) == true)
            {
                // TODO: Donesn't work!
                //foreach (var newMachine in _machines.Find(x => Machines.All(y => x.Id != y.Id)).ToList())
                foreach (var newMachine in _machines.FindAll().Where(x => Machines.All(y => x.Id != y.Id)).ToList())
                {
                    Machines.Add(new MachineViewModel(newMachine, _machines));
                }

                NotifyOfPropertyChange(() => Machines);
            }
        }