示例#1
0
        public virtual bool FilterFindPredicate(object obj) //предикат для фильтра-поиск
        {
            bool result = false;

            if (String.IsNullOrEmpty(this.FilterFindValue))
            {
                return(true);
            }

            AppObjectBase appObjectBase = obj as AppObjectBase;

            if (appObjectBase != null)
            {
                string value  = StringHelper.RemoveUnnecessaryChars(appObjectBase.NameBase);
                string search = StringHelper.RemoveUnnecessaryChars(this.FilterFindValue);
                return(value.ToUpper().Contains(search.ToUpper()));
            }
            return(result);
        }
示例#2
0
 private void AppObjectBase_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
 {
     if (e.PropertyName == "IsChecked")
     {
         AppObjectBase appObjectBase = sender as AppObjectBase;
         if (appObjectBase != null)
         {
             if (appObjectBase.IsChecked == true)
             {
                 this.SelectedItemsCount++;
             }
             else
             {
                 this.SelectedItemsCount--;
             }
             this.isChecked = true;
         }
         this.OnPropertyChanged("Items");
     }
 }
示例#3
0
        public bool FilterOnlyCheckedPredicate(object obj)
        {
            AppObjectBase appObjectBase = obj as AppObjectBase;

            return(appObjectBase?.IsChecked == true);
        }