private void InitEventLevelBinder() { EventLevelBinder binder = new EventLevelBinder(this); EventLevelBinder binder1 = new EventLevelBinder(this) { EventLevelName = "级别1", EventLevel = 1 }; EventLevelBinder binder2 = new EventLevelBinder(this) { EventLevelName = "级别2", EventLevel = 2 }; this.EventBinderCollection.Add(binder); this.EventBinderCollection.Add(binder1); this.EventBinderCollection.Add(binder2); }
internal void Filter(EventLevelBinder eventLevelBinder) { var selectedLevels = from o in this.EventBinderCollection where o.IsChecked select o.EventLevel; var filtered = from one in this.values where selectedLevels.Contains(one.EventLevel) select one; this.DecisionRecordCollection = new ObservableCollection<DecisionWrap>(filtered); }