Beispiel #1
0
 public void Clear()
 {
     for (var i = 0; i < _list.Count; i++)
     {
         var oldValue = _list[i];
         var index    = i;
         _list[i] = default;
         Args     = new TrackableListEventArgs <T>(index, oldValue, default, 2);
Beispiel #2
0
        public TrackableListEventArgs <T> Args = new TrackableListEventArgs <T>(-1, default(T), default(T), 0); //Nothing

        public void Add(T value)
        {
            _list.Add(value);
            var index    = _list.Count - 1;
            var oldValue = default(T);

            Args = new TrackableListEventArgs <T>(index, oldValue, value, 1);
            OnChangeEvent(Args);
        }
Beispiel #3
0
 private void TrackableList_ChangeEvent <T>(object sndr, TrackableListEventArgs <T> ev)
 {
     richTextBox_output.Text += "Old Value: " + ev.OldValue + " New Value: " + ev.NewValue +
                                " at index: " + ev.Index + " Happened: " + ev.WhatHappened + Environment.NewLine;
 }