1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using SmartCoalApplication.Base;
- using SmartCoalApplication.Core.CustomControl;
- using SmartCoalApplication.CustomControl;
- using System;
- using System.Windows.Forms;
- namespace SmartCoalApplication.Core.Param
- {
- /// <summary>
- /// 奇数范围
- /// </summary>
- 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;
- }
- }
- }
- }
|