Esempio n. 1
0
 private void ValidateNodeName(ValidateObjectProperty <ViewModelNode, string> obj)
 {
     if (!String.IsNullOrWhiteSpace(obj.Property))
     {
         if (!Nodes.Any(x => x.Name == obj.Property))
         {
             obj.Obj.Name = obj.Property;
         }
     }
 }
Esempio n. 2
0
 private void ValidateConnectName(ValidateObjectProperty <ViewModelConnector, string> obj)
 {
     if (!String.IsNullOrWhiteSpace(obj.Property))
     {
         if (!Connects.Any(x => x.FromConnector.Name == obj.Property))
         {
             obj.Obj.Name = obj.Property;
         }
     }
 }
Esempio n. 3
0
        internal void AddUser(UserViewModel userViewModel)
        {
            if (_users.Any(x => x.User.Equals(userViewModel)))
            {
                return;
            }

            var userVm = new RoomUserViewModel(userViewModel);

            userVm.IsOwner = _owners.Any(x => x.Equals(userVm.User.Name));

            _users.Add(userVm);

            // TODO: Implement notification to the room of the joined user
        }
Esempio n. 4
0
        public ScanAreaModel AddArea(string key)
        {
            if (Areas.Any(x => x.Key == key))
            {
                return(null);
            }
            var model = new ScanAreaModel
            {
                Width  = 64,
                Height = 64,
                Key    = key
            };

            areas.Add(model);
            return(model);
        }
Esempio n. 5
0
 public bool Any()
 {
     return(_selectedItems.Any());
 }