Exemplo n.º 1
0
        void AddNewMachine(string newMachineName)
        {
            if (string.IsNullOrEmpty(newMachineName))
            {
                return;
            }
            if (Machines.Any(m => m.MachineName == newMachineName))
            {
                return;
            }

            var newMachine = new Machine {
                MachineName = newMachineName
            };

            Machines.Add(newMachine);

            Messenger.Default.Send(new MachineAdded(newMachine));
        }