public void Unselect(int index) { if (RangeCollection.Remove(index)) { OnChanged(); } }
public void QuietSelect(int index) { RangeCollection.Add(index); if (Count == 1) { first_selected_index = index; } }
public void ToggleSelect(int index) { if (!RangeCollection.Remove(index)) { RangeCollection.Add(index); } OnChanged(); }
public void Select(int index, bool notify) { RangeCollection.Add(index); if (Count == 1) { first_selected_index = index; } if (notify) { OnChanged(); } }
public void Clear(bool raise) { if (RangeCollection.Count <= 0) { return; } RangeCollection.Clear(); if (raise) { OnChanged(); } }
public void UnselectRange(int a, int b, bool notify) { int start = Math.Min(a, b); int end = Math.Max(a, b); int i; for (i = start; i <= end; i++) { RangeCollection.Remove(i); } if (notify) { OnChanged(); } }
public void SelectRange(int a, int b, bool notify) { int start = Math.Min(a, b); int end = Math.Max(a, b); int i; for (i = start; i <= end; i++) { RangeCollection.Add(i); } if (Count == i) { first_selected_index = a; } if (notify) { OnChanged(); } }
public IEnumerator <int> GetEnumerator() { return(RangeCollection.GetEnumerator()); }
public bool Contains(int index) { return(RangeCollection.Contains(index)); }
public void QuietUnselect(int index) { RangeCollection.Remove(index); }