public string PHUnitsToString(PHSampleUnitsEnum Units) { if (Units == PHSampleUnitsEnum.CaCl2) { return("CaCl2"); } return("1:5 water"); }
/// <summary>Phes the units set.</summary> /// <param name="ToUnits">To units.</param> public void PHUnitsSet(PHSampleUnitsEnum ToUnits) { if (ToUnits != PHUnits) { // convert the numbers if (ToUnits == PHSampleUnitsEnum.Water) { PH = PHWater; } else { PH = PHCaCl2; } PHUnits = ToUnits; } }
public void PHUnitsSet(PHSampleUnitsEnum ToUnits) { if (ToUnits != PHUnits && PH != null) { // convert the numbers if (ToUnits == PHSampleUnitsEnum.Water) { // pH in water = (pH in CaCl X 1.1045) - 0.1375 PH = MathUtility.Subtract_Value(MathUtility.Multiply_Value(PH, 1.1045), 0.1375); } else { // pH in CaCl = (pH in water + 0.1375) / 1.1045 PH = MathUtility.Divide_Value(MathUtility.Add_Value(PH, 0.1375), 1.1045); } } PHUnits = ToUnits; }
/// <summary>Phes the units set.</summary> /// <param name="ToUnits">To units.</param> public void PHUnitsSet(PHSampleUnitsEnum ToUnits) { if (ToUnits != PHUnits) { // convert the numbers if (ToUnits == PHSampleUnitsEnum.Water) { PH = PHWater; } else { PH = PHCaCl2; } PHUnits = ToUnits; } }