123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- using PaintDotNet.Base;
- using PaintDotNet.CustomControl;
- using System;
- using System.Windows.Forms;
- namespace PaintDotNet.Data.Param
- {
- /// <summary>
- /// 整数范围
- /// </summary>
- 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;
- }
- }
- }
- }
|