Ejemplo n.º 1
0
 public void Unselect(int index)
 {
     if (RangeCollection.Remove(index))
     {
         OnChanged();
     }
 }
Ejemplo n.º 2
0
 public void QuietSelect(int index)
 {
     RangeCollection.Add(index);
     if (Count == 1)
     {
         first_selected_index = index;
     }
 }
Ejemplo n.º 3
0
        public void ToggleSelect(int index)
        {
            if (!RangeCollection.Remove(index))
            {
                RangeCollection.Add(index);
            }

            OnChanged();
        }
Ejemplo n.º 4
0
        public void Select(int index, bool notify)
        {
            RangeCollection.Add(index);
            if (Count == 1)
            {
                first_selected_index = index;
            }

            if (notify)
            {
                OnChanged();
            }
        }
Ejemplo n.º 5
0
        public void Clear(bool raise)
        {
            if (RangeCollection.Count <= 0)
            {
                return;
            }

            RangeCollection.Clear();
            if (raise)
            {
                OnChanged();
            }
        }
Ejemplo n.º 6
0
        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();
            }
        }
Ejemplo n.º 7
0
        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();
            }
        }
Ejemplo n.º 8
0
 public IEnumerator <int> GetEnumerator()
 {
     return(RangeCollection.GetEnumerator());
 }
Ejemplo n.º 9
0
 public bool Contains(int index)
 {
     return(RangeCollection.Contains(index));
 }
Ejemplo n.º 10
0
 public void QuietUnselect(int index)
 {
     RangeCollection.Remove(index);
 }