using System.Collections.ObjectModel;

namespace Mesnac.Controls.ChemicalWeighing.HslCurve
{
    /// <summary>
    /// 关联的其他轴的集合
    /// </summary>
    // Token: 0x02000024 RID: 36
    public class ReferenceAxisCollection : Collection<ReferenceAxis>
    {
        /// <summary>
        /// 实例化一个默认的对象
        /// </summary>
        /// <param name="hslCurveHistory"></param>
        // Token: 0x060003A2 RID: 930 RVA: 0x000290BE File Offset: 0x000272BE
        public ReferenceAxisCollection(HslCurveHistory hslCurveHistory)
        {
            this.hslCurveHistory = hslCurveHistory;
        }

        /// <inheritdoc />
        // Token: 0x060003A3 RID: 931 RVA: 0x000290CF File Offset: 0x000272CF
        protected override void InsertItem(int index, ReferenceAxis item)
        {
            base.InsertItem(index, item);
            HslCurveHistory hslCurveHistory = this.hslCurveHistory;
            if (hslCurveHistory != null)
            {
                hslCurveHistory.Invalidate();
            }
        }

        /// <inheritdoc />
        // Token: 0x060003A4 RID: 932 RVA: 0x000290ED File Offset: 0x000272ED
        protected override void SetItem(int index, ReferenceAxis item)
        {
            base.SetItem(index, item);
            HslCurveHistory hslCurveHistory = this.hslCurveHistory;
            if (hslCurveHistory != null)
            {
                hslCurveHistory.Invalidate();
            }
        }

        /// <inheritdoc />
        // Token: 0x060003A5 RID: 933 RVA: 0x0002910B File Offset: 0x0002730B
        protected override void ClearItems()
        {
            base.ClearItems();
            HslCurveHistory hslCurveHistory = this.hslCurveHistory;
            if (hslCurveHistory != null)
            {
                hslCurveHistory.Invalidate();
            }
        }

        /// <inheritdoc />
        // Token: 0x060003A6 RID: 934 RVA: 0x00029127 File Offset: 0x00027327
        protected override void RemoveItem(int index)
        {
            base.RemoveItem(index);
            HslCurveHistory hslCurveHistory = this.hslCurveHistory;
            if (hslCurveHistory != null)
            {
                hslCurveHistory.Invalidate();
            }
        }

        // Token: 0x040001C6 RID: 454
        private HslCurveHistory hslCurveHistory;
    }
}