public NuclearComposition() { PuMass = new MeasuredValue(); Pu238MassPercent = new MeasuredValue(); Pu239MassPercent = new MeasuredValue(); Pu240MassPercent = new MeasuredValue(); Pu241MassPercent = new MeasuredValue(); Pu242MassPercent = new MeasuredValue(); Am241MassPercent = new MeasuredValue(); PuDate = new DateTime(1776, 7, 4); AmDate = new DateTime(1776, 7, 4); UMass = new MeasuredValue(); U234MassPercent = new MeasuredValue(); U235MassPercent = new MeasuredValue(); U236MassPercent = new MeasuredValue(); U238MassPercent = new MeasuredValue(); }
public ReturnCode InputWithValidation(MeasuredValue measuredValue, string value, string uncertainty) { if (value == "" && uncertainty == "") { measuredValue.Unset(); } else { try { measuredValue.Value = double.Parse(value); measuredValue.Uncertainty = double.Parse(uncertainty); } catch { return(ReturnCode.BAD_INPUT); } } return(ReturnCode.SUCCESS); }