private void ListBoxSelectionChanged(object sender, SelectionChangedEventArgs e) { if (ItemsSource == null) { return; } var boolArray = ItemsSource.As <IEnumerable>().OfType <Common.ISelectable>() .Select(o => (o.IsSelected == true)).ToArray(); var newValue = boolArray.ToInteger(); if (newValue == ArrayInt) { return; } ArrayInt = newValue; }
internal void Update() { if (ItemsSource == null) { if (_lines != null) { _lines.Clear(); } _lines = null; return; } var category = FilterParams == null ? 0 : System.Convert.ToInt32(FilterParams); _lines = ItemsSource.SaftyGetProperty <IList <IVisibleLinerData>, IEnumerable>(l => l.OfType <IVisibleLinerData>().Where(o => Equals(o.Category, category)).ToList() , () => new List <IVisibleLinerData> { ItemsSource.As <IVisibleLinerData>() }); _max = _lines.Max(l => l.MaxValue); }