protected override ValidationResult Validate(object value) { var ret = new ValidationResult(); var CPolarVal = new PolarValue(); var strValue = value.ToString(); if (Math.IsDoubleValid(strValue)) { ret.IsValid = true; CPolarVal.Val = System.Convert.ToDouble(strValue); ret.Value = CPolarVal; } else { ret.IsValid = false; } return(ret); }
public Settings(Page page) { Page = page; this.DebugInfo = new DebugInformation(page); // create Polar List DynamicGeometry.Settings.Instance.PolarItems = new[] { "5", "10", "15", "18", "22.5", "30", "45", "90" }; PolarValue a = new PolarValue(); a.Val = 30; DynamicGeometry.Settings.Instance.PolarIncrement = a; }