示例#1
0
 public bool RemoveEquipment(string id)
 {
     if (!Equipments.Any(x => x == id))
     {
         return(false);
     }
     Equipments.Remove(id);
     return(true);
 }
示例#2
0
 public bool AddEquipment(string id)
 {
     if (Equipments.Any(x => x == id))
     {
         return(false);
     }
     Equipments.Add(id);
     return(true);
 }
示例#3
0
        public void ApplySearchText(SearchStatement searchStatement)
        {
            if (searchStatement == null || searchStatement.IsEmpty)
            {
                IsVisible = true;
                return;
            }

            IsVisible =
                searchStatement.IsMatching(Localization.Get(Name)) ||
                Equipments.Any(x => searchStatement.IsMatching(Localization.Get(x.Name)));
        }