Пример #1
0
        public void RemoveAt(int index)
        {
            var e = new ListOptionEventArgs(null);

            this.Removing?.Invoke(this, e);
            this.InnerList.RemoveAt(index);
            this.Removed?.Invoke(this, e);
        }
Пример #2
0
        public void Insert(int index, TValue value)
        {
            if (this.Contains(value))
            {
                throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorOptionDuplicateValueFormat, this.Owner.Name, value));
            }
            var e = new ListOptionEventArgs(value);

            this.Inserting?.Invoke(this, e);
            this.InnerList.Insert(index, CastValue(e.Value));
            this.Inserted?.Invoke(this, e);
        }
Пример #3
0
 private void InnerList_Removed(object sender, ListOptionEventArgs e)
 {
     OnValueChanged(e.Value);
 }
Пример #4
0
 private void InnerList_Inserting(object sender, ListOptionEventArgs e)
 {
     e.Value = OnValueChanging(e.Value);
 }