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