Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/03/16 17:13:50 (8 years ago)
Author:
jlodewyc
Message:

#2582 Parameter changing busy, save file, download file and email on pass reset

Location:
branches/WebJobManager/HeuristicLab.Data/3.3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/WebJobManager/HeuristicLab.Data/3.3/BoolValue.cs

    r13656 r13827  
    4848    }
    4949
    50     public override IDeepCloneable Clone(Cloner cloner) {
     50        public static BoolValue Parse(string val)
     51        {
     52            if (val == "true" || val == "on")
     53                return new BoolValue(true);
     54            else
     55                return new BoolValue(false);
     56        }
     57
     58        public override IDeepCloneable Clone(Cloner cloner) {
    5159      return new BoolValue(this, cloner);
    5260    }
  • branches/WebJobManager/HeuristicLab.Data/3.3/DoubleValue.cs

    r13656 r13827  
    4444    public DoubleValue(double value) : base(value) { }
    4545
    46     public override IDeepCloneable Clone(Cloner cloner) {
     46        public static DoubleValue Parse(string val)
     47        {
     48            return new DoubleValue(Double.Parse(val));
     49        }
     50
     51        public override IDeepCloneable Clone(Cloner cloner) {
    4752      return new DoubleValue(this, cloner);
    4853    }
  • branches/WebJobManager/HeuristicLab.Data/3.3/IntValue.cs

    r13656 r13827  
    5555        return Value.CompareTo(obj);
    5656    }
     57        public static IntValue Parse(string val)
     58        {
     59            return new IntValue(int.Parse(val));
     60        }
    5761
    5862    protected virtual bool Validate(string value, out string errorMessage) {
  • branches/WebJobManager/HeuristicLab.Data/3.3/PercentValue.cs

    r12012 r13827  
    5353    public PercentValue(double value) : base(value) { }
    5454
    55     public PercentValue(double value, bool restrictToUnitInterval)
     55        public static PercentValue Parse(string val)
     56        {
     57            return new PercentValue((Double.Parse(val) / 100));
     58        }
     59
     60        public PercentValue(double value, bool restrictToUnitInterval)
    5661      : base() {
    5762      this.restrictToUnitInterval = restrictToUnitInterval;
Note: See TracChangeset for help on using the changeset viewer.