1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- using SmartCoalApplication.Base;
- using SmartCoalApplication.Core.CustomControl;
- using SmartCoalApplication.CustomControl;
- using System;
- using System.Windows.Forms;
- namespace SmartCoalApplication.Core.Param
- {
- /// <summary>
- /// 小数范围
- /// </summary>
- 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;
- }
- /// <summary>
- /// 十进制位数
- /// </summary>
- 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;
- }
- }
- }
- }
|