using SmartCoalApplication.Base;
using SmartCoalApplication.Core.CustomControl;
using SmartCoalApplication.CustomControl;
using System;
using System.Windows.Forms;
namespace SmartCoalApplication.Core.Param
{
///
/// 小数范围
///
public class DecimalNumber : Args
{
private int decimalPlaces;
private decimal min;
private decimal max;
public void numberParam_ValueChanged(object sender, EventArgs e)
{
if (sender.GetType() == typeof(NumberParamControl))
{
this.Value = ((NumberParamControl)sender).Value;
}
else if (sender.GetType() == typeof(NumericUpDown))
{
this.Value = ((NumericUpDown)sender).Value;
}
}
public DecimalNumber(decimal min, int max)
{
this.Type = Dtryt.Decimal;
this.decimalPlaces = 0;
this.min = min;
this.max = max;
}
///
/// 十进制位数
///
public int DecimalPlaces
{
get
{
return this.decimalPlaces;
}
set
{
this.decimalPlaces = value;
}
}
public decimal Min
{
get
{
return this.min;
}
set
{
this.min = value;
}
}
public decimal Max
{
get
{
return this.max;
}
set
{
this.max = value;
}
}
}
}