Exemple #1
0
 public override void SetListValues(string text)
 {
     _valueList.Clear( );
     foreach (Match match in Regex.Matches(text, CornerValue.stringRegex, RegexOptions.IgnoreCase))
     {
         if (!CornerValue.IsCheck(match.Value))
         {
             continue;
         }
         Value  valueObject = new CornerValue(match.Value);
         double value       = Convert.ToDouble(valueObject.Data);
         if (value < -360.0)
         {
             valueObject.Data = -360.0;
         }
         if (value > 360.0)
         {
             valueObject.Data = 360.0;
         }
         _valueList.Add(valueObject);
     }
 }
 public override void SetListValues(string text)
 {
     _valueList.Clear( );
     foreach (Match match in Regex.Matches(text, CornerValue.stringRegex, RegexOptions.IgnoreCase))
     {
         if (Data.Degrees == true)
         {
             if (!CornerValue.IsCheck(match.Value))
             {
                 continue;
             }
             Value valueObject = new CornerValue(match.Value);
             int   value       = Convert.ToInt32(valueObject.Data);
             if (value < 0)
             {
                 valueObject.Data = 0;
             }
             if (value > 360)
             {
                 valueObject.Data = 360;
             }
             else
             {
                 valueObject.Data = value;
             }
             _valueList.Add(valueObject);
         }
         else
         {
             if (!IntegerValue.IsCheck(match.Value))
             {
                 continue;
             }
             _valueList.Add(new IntegerValue(match.Value));
         }
     }
 }