CurveCell.cs 1.99 KB
Newer Older
潘栩锋's avatar
潘栩锋 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
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>
潘栩锋's avatar
潘栩锋 committed
26 27 28
        public int Value { get; set; }

        public int AD { get; set; }
潘栩锋's avatar
潘栩锋 committed
29 30 31 32 33


        /// <summary>
        /// 校正后的AD值
        /// </summary>
潘栩锋's avatar
潘栩锋 committed
34 35
        public int RevisedAD { get; set; }

潘栩锋's avatar
潘栩锋 committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93

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