using System.ComponentModel;

namespace FLY.Thick.Base.Common
{
    public class CurveCell : INotifyPropertyChanged
    {
        public override string ToString()
        {
            return "value=" + Value.ToString() + " ad=" + AD.ToString() + " revisedad=" + RevisedAD.ToString();
        }

        /// <summary>
        /// 面密度
        /// </summary>
        public double Value { get; set; }

        public int AD { get; set; }

        /// <summary>
        /// 校正后的AD值
        /// </summary>
        public int RevisedAD { get; set; }

        #region INotifyPropertyChanged 成员
        public event PropertyChangedEventHandler PropertyChanged;

        #endregion
    }

    public class CurveCell2 : INotifyPropertyChanged
    {
        public override string ToString()
        {
            return $"ad={AD},value={Value:F2}";
        }
        /// <summary>
        /// 面密度
        /// </summary>
        public double Value { get; set; }

        public int AD { get; set; }

        #region INotifyPropertyChanged 成员
        public event PropertyChangedEventHandler PropertyChanged;
        #endregion
    }

    public enum AD2ValueFlag
    {
        /// <summary>
        /// 修正后的曲线
        /// </summary>
        Revised,
        /// <summary>
        /// 原始曲线
        /// </summary>
        NoRevised
    }
    /// <summary>
    /// 曲线类型
    /// </summary>
    public enum CurveType
    {
        /// <summary>
        /// 自然对数
        /// </summary>
        E,
        /// <summary>
        /// 直线拟合
        /// </summary>
        Line,
        /// <summary>
        /// 二次拟合
        /// </summary>
        X2
    }
    public enum CurveCorrectWay
    {
        /// <summary>
        /// 单点校正时，比例放大
        /// </summary>
        OnePointIsScale,
        /// <summary>
        /// 单点校正时，平移
        /// </summary>
        OnePointIsOffset
    }
}
