using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
namespace FLY.Simulation.Casting
{
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();
}
private int _value;
///
/// 面密度
///
public int Value
{
get { return _value; }
set
{
_value = value;
NotifyPropertyChanged("Value");
}
}
private int _ad;
public int AD
{
get { return _ad; }
set
{
_ad = value;
NotifyPropertyChanged("AD");
}
}
private int _revisedAD;
///
/// 校正后的AD值
///
public int RevisedAD
{
get { return _revisedAD; }
set
{
_revisedAD = value;
NotifyPropertyChanged("RevisedAD");
}
}
#region ISaveToXml 成员
public string[] GetSavePropertyNames()
{
return new string[]{
"Value",
"AD"};
}
#endregion
#region INotifyPropertyChanged 成员
protected void NotifyPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
public event PropertyChangedEventHandler PropertyChanged;
#endregion
}
public enum AD2ValueFlag
{
///
/// 修正后的曲线
///
Revised,
///
/// 原始曲线
///
NoRevised
}
///
/// 曲线类型
///
public enum CurveType
{
///
/// 自然对数
///
E,
///
/// 直线拟合
///
Line,
///
/// 二次拟合
///
X2
}
public enum CurveCorrectWay
{
///
/// 单点校正时,比例放大
///
OnePointIsScale,
///
/// 单点校正时,平移
///
OnePointIsOffset
}
}