public NumberRangePropertyEditorControl(NumberRange range)
        {
            InitializeComponent();

            this.txtStart.Text = range.BeginValue.ToString();
            this.txtEnd.Text = range.EndValue.ToString();

            if (range == null) throw new ArgumentNullException("range");
            this._range = range;
        }
Ejemplo n.º 2
0
        public static NumberRange Parse(string value)
        {
            var result = new NumberRange();

            if (string.IsNullOrEmpty(value) == false)
            {
                var values = value.Split(new string[] { SPLIT_STRING }, StringSplitOptions.RemoveEmptyEntries);
                if (values.Length > 1)
                {
                    result._beginValue = Convert.ToDouble(values[0]);
                    result._endValue   = Convert.ToDouble(values[1]);
                }
                else if (values.Length == 1)
                {
                    result._endValue = Convert.ToDouble(values[0]);
                }
            }

            return(result);
        }
Ejemplo n.º 3
0
        public static NumberRange Parse(string value)
        {
            var result = new NumberRange();

            if (string.IsNullOrEmpty(value) == false)
            {
                var values = value.Split(new string[] { SPLIT_STRING }, StringSplitOptions.RemoveEmptyEntries);
                if (values.Length > 1)
                {
                    result._beginValue = Convert.ToDouble(values[0]);
                    result._endValue = Convert.ToDouble(values[1]);
                }
                else if (values.Length == 1)
                {
                    result._endValue = Convert.ToDouble(values[0]);
                }
            }

            return result;
        }
Ejemplo n.º 4
0
 /// <summary>
 /// 克隆一个对象
 /// </summary>
 /// <param name="a"></param>
 public NumberRange(NumberRange a)
 {
     this._beginValue = a._beginValue;
     this._endValue = a._endValue;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 克隆一个对象
 /// </summary>
 /// <param name="a"></param>
 public NumberRange(NumberRange a)
 {
     this._beginValue = a._beginValue;
     this._endValue   = a._endValue;
 }
 public NumberRangeClickEventArgs(NumberRange range)
 {
     this._range = range;
 }