using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Misc;
using System.Xml;
using System.ComponentModel;
using System.Collections.ObjectModel;

namespace FLY.Thick.Base.Common
{
    public class CurveCell : Misc.ISaveToXml, INotifyPropertyChanged
    {
        static CurveCell() 
        {
            Misc.SaveToXmlHepler.Regist(typeof(CurveCell));
        }
        public override string ToString()
        {
            return "value=" + Value.ToString() + " ad=" + AD.ToString() + " revisedad=" + RevisedAD.ToString();
        }
        /// <summary>
        /// 面密度
        /// </summary>
        public int Value { get; set; }

        public int AD { get; set; }


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


        #region ISaveToXml 成员

        public string[] GetSavePropertyNames()
        {
            return new string[]{
                    "Value",
                    "AD"};
        }

        #endregion

        #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
    }
}
