using SmartCoalApplication.Base; using SmartCoalApplication.Core.CustomControl; using SmartCoalApplication.CustomControl; using System; using System.Windows.Forms; namespace SmartCoalApplication.Core.Param { /// /// 整数范围 /// public class IntegerNumber : Args { private int min; private int 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 = (int)((NumericUpDown)sender).Value; } } public IntegerNumber(int min, int max) { this.Type = Dtryt.Interger; this.min = min; this.max = max; } public IntegerNumber(string key, string name) { this.Type = Dtryt.Interger; this.key = key; this.name = name; } public IntegerNumber(int min, int max, int initialValue, string key, string name) { this.Type = Dtryt.Interger; this.min = min; this.max = max; this.initialValue = initialValue; this.value = initialValue; this.key = key; this.name = name; } public int Min { get { return this.min; } set { this.min = value; } } public int Max { get { return this.max; } set { this.max = value; } } } }