public void TypeFilter(ObservableCollection <EntityShow> list, Type filterType, string filter)
 {
     list.Clear();
     if (filterType == null)
     {
         AllEntityList.ForEach(v =>
         {
             if (IsFit(v, filter))
             {
                 list.Add(v);
             }
         });
     }
     else
     {
         AllEntityList.ForEach(v =>
         {
             if (v.GetType().GetTypeInfo().IsSubclassOf(filterType))
             {
                 if (IsFit(v, filter))
                 {
                     list.Add(v);
                 }
             }
         });
     }
 }
Ejemplo n.º 2
0
        //public string Filter
        //{
        //    get { return _Filter; }
        //    set
        //    {
        //        if (_Filter != value)
        //        {
        //            ShowEntityList.Clear();
        //            AllEntityList.ForEach(v =>
        //            {
        //                if (IsFit(v))
        //                    ShowEntityList.Add(v);
        //            });

        //        }
        //        _Filter = value;
        //        OnPropertyChanged("Filter");
        //    }
        //}
        public void Filter(string filter)
        {
            _Filter = filter;
            ShowEntityList.Clear();
            AllEntityList.ForEach(v =>
            {
                if (IsFit(v, filter))
                {
                    ShowEntityList.Add(v);
                }
            });
        }
Ejemplo n.º 3
0
 public void ClearSelect()
 {
     AllEntityList.ForEach(v => v.IsSelected = false);
 }